Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARC: bpf: define uapi for BPF_PROG_TYPE_PERF_EVENT program type

Define appropriate uapi for the BPF_PROG_TYPE_PERF_EVENT program type
by exporting the user_regs_struct structure instead of the pt_regs
structure that is in-kernel only.

Signed-off-by: Sergey Matyukevich <sergey.matyukevich@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@kernel.org>

authored by

Sergey Matyukevich and committed by
Vineet Gupta
6aa98f62 9a78a8a8

+13
+4
arch/arc/include/asm/perf_event.h
··· 63 63 64 64 #define PERF_COUNT_ARC_HW_MAX (PERF_COUNT_HW_MAX + 8) 65 65 66 + #ifdef CONFIG_PERF_EVENTS 67 + #define perf_arch_bpf_user_pt_regs(regs) (struct user_regs_struct *)regs 68 + #endif 69 + 66 70 #endif /* __ASM_PERF_EVENT_H */
+9
arch/arc/include/uapi/asm/bpf_perf_event.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 + #ifndef _UAPI__ASM_BPF_PERF_EVENT_H__ 3 + #define _UAPI__ASM_BPF_PERF_EVENT_H__ 4 + 5 + #include <asm/ptrace.h> 6 + 7 + typedef struct user_regs_struct bpf_user_pt_regs_t; 8 + 9 + #endif /* _UAPI__ASM_BPF_PERF_EVENT_H__ */