summaryrefslogtreecommitdiff
path: root/arch/powerpc/include/asm/perf_event.h
diff options
context:
space:
mode:
authorSandipan Das <sandipan@linux.ibm.com>2018-12-06 12:27:01 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2018-12-07 15:19:04 +0300
commita6460b03f945ee216dbf42a0d9ee78d52fd470c2 (patch)
tree6829bede4f649bfe25a83a515a6dbd955762679d /arch/powerpc/include/asm/perf_event.h
parente41b93a6be57e26a4a123345f826a6ac3a213551 (diff)
downloadlinux-a6460b03f945ee216dbf42a0d9ee78d52fd470c2.tar.xz
powerpc/bpf: Fix broken uapi for BPF_PROG_TYPE_PERF_EVENT
Now that there are different variants of pt_regs for userspace and kernel, the uapi for the BPF_PROG_TYPE_PERF_EVENT program type must be changed by exporting the user_pt_regs structure instead of the pt_regs structure that is in-kernel only. Fixes: 002af9391bfb ("powerpc: Split user/kernel definitions of struct pt_regs") Signed-off-by: Sandipan Das <sandipan@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/include/asm/perf_event.h')
-rw-r--r--arch/powerpc/include/asm/perf_event.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/perf_event.h b/arch/powerpc/include/asm/perf_event.h
index 8bf1b6351716..16a49819da9a 100644
--- a/arch/powerpc/include/asm/perf_event.h
+++ b/arch/powerpc/include/asm/perf_event.h
@@ -26,6 +26,8 @@
#include <asm/ptrace.h>
#include <asm/reg.h>
+#define perf_arch_bpf_user_pt_regs(regs) &regs->user_regs
+
/*
* Overload regs->result to specify whether we should use the MSR (result
* is zero) or the SIAR (result is non zero).