Hendrik Brueckner c895f6f703 bpf: correct broken uapi for BPF_PROG_TYPE_PERF_EVENT program type
Commit 0515e5999a466dfe ("bpf: introduce BPF_PROG_TYPE_PERF_EVENT
program type") introduced the bpf_perf_event_data structure which
exports the pt_regs structure.  This is OK for multiple architectures
but fail for s390 and arm64 which do not export pt_regs.  Programs
using them, for example, the bpf selftest fail to compile on these
architectures.

For s390, exporting the pt_regs is not an option because s390 wants
to allow changes to it.  For arm64, there is a user_pt_regs structure
that covers parts of the pt_regs structure for use by user space.

To solve the broken uapi for s390 and arm64, introduce an abstract
type for pt_regs and add an asm/bpf_perf_event.h file that concretes
the type.  An asm-generic header file covers the architectures that
export pt_regs today.

The arch-specific enablement for s390 and arm64 follows in separate
commits.

Reported-by: Thomas Richter <tmricht@linux.vnet.ibm.com>
Fixes: 0515e5999a466dfe ("bpf: introduce BPF_PROG_TYPE_PERF_EVENT program type")
Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Reviewed-and-tested-by: Thomas Richter <tmricht@linux.vnet.ibm.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
2017-12-05 15:02:40 +01:00
..
2017-11-16 14:05:12 -08:00
2017-11-14 16:49:31 -08:00
2017-11-14 14:44:04 -08:00
2017-11-16 09:15:57 -08:00
2017-11-15 14:54:53 -08:00
2017-11-15 14:54:53 -08:00
2017-11-13 10:17:35 -08:00
2017-11-13 21:14:07 -08:00
2017-11-13 21:14:07 -08:00
2017-11-13 01:34:49 +01:00
2017-11-15 13:28:48 -08:00
2017-11-23 10:56:35 +01:00
2017-11-22 21:40:54 +01:00
2017-09-07 21:11:05 -07:00
2017-07-03 16:56:28 -06:00
2017-11-15 18:21:04 -08:00
2017-08-30 14:40:40 +02:00
2017-11-15 10:56:56 -08:00
2017-09-04 00:06:02 +02:00
2017-11-13 21:05:31 -08:00
2017-11-17 09:51:57 -08:00
2017-11-14 16:54:12 -08:00
2017-08-24 13:23:03 -07:00
2017-11-15 18:21:04 -08:00
2017-07-17 13:42:48 +02:00
2017-11-05 16:42:02 -08:00
2017-08-07 17:22:14 +02:00
2017-11-13 01:41:20 +01:00
2017-11-17 14:58:01 -08:00
2017-11-15 18:21:06 -08:00
2017-06-21 14:37:12 -04:00
2017-11-17 16:10:04 -08:00
2017-11-17 14:58:01 -08:00
2017-11-15 18:21:05 -08:00
2017-11-17 09:51:57 -08:00
2017-11-14 11:23:05 +01:00
2017-11-15 10:56:56 -08:00
2017-11-15 18:21:01 -08:00
2017-11-17 16:10:04 -08:00
2017-10-12 15:41:05 +02:00
2017-11-15 18:21:05 -08:00
2017-11-15 18:21:01 -08:00
2017-12-01 13:09:40 -08:00
2017-10-19 10:08:56 +02:00
2017-10-07 10:45:02 -06:00
2017-08-28 20:51:22 +02:00
2017-11-15 18:21:04 -08:00
2017-11-29 18:40:42 -08:00
2017-11-17 09:51:57 -08:00
2017-11-15 13:46:33 -08:00
2017-11-15 18:21:04 -08:00
2017-11-17 14:18:00 -08:00
2017-11-17 14:18:00 -08:00
2017-11-17 16:10:00 -08:00
2017-07-25 18:05:25 +02:00
2017-11-15 15:01:28 -08:00
2017-10-20 09:37:32 +02:00
2017-11-15 18:21:03 -08:00
2017-11-15 18:21:06 -08:00
2017-11-09 10:23:28 +01:00
2017-08-06 20:55:29 -07:00
2017-11-17 16:10:04 -08:00
2017-11-17 16:10:04 -08:00
2017-11-13 01:33:48 +01:00
2017-08-16 16:28:47 -07:00
2017-11-17 20:14:10 -08:00
2017-11-15 18:21:04 -08:00
2017-11-07 12:22:21 +01:00
2017-11-15 20:42:10 -08:00
2017-07-06 16:24:30 -07:00
2017-11-15 20:42:10 -08:00
2017-08-16 16:28:47 -07:00
2017-11-15 18:21:01 -08:00
2017-11-15 18:21:06 -08:00
2017-11-15 18:21:01 -08:00
2017-11-17 14:58:01 -08:00
2017-10-11 22:36:54 -04:00
2017-11-14 18:01:46 -08:00
2017-07-24 17:50:37 +02:00
2017-10-04 10:29:22 +02:00
2017-08-15 09:02:07 -07:00
2017-08-15 09:02:08 -07:00