summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/ptrace
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2022-03-07 13:34:32 +0100
committerMichael Ellerman <mpe@ellerman.id.au>2022-03-07 13:34:32 +0100
commit4bc06c59f62d3d376294f92cf808fc889b3ff431 (patch)
treec5b177975b0f7da164e63f0188665d6d245ff073 /arch/powerpc/kernel/ptrace
parentpowerpc/lib/sstep: Fix build errors with newer binutils (diff)
parentlkdtm: Add a test for function descriptors protection (diff)
downloadlinux-4bc06c59f62d3d376294f92cf808fc889b3ff431.tar.xz
linux-4bc06c59f62d3d376294f92cf808fc889b3ff431.zip
Merge branch 'topic/func-desc-lkdtm' into next
Merge a topic branch we are maintaining with some cross-architecture changes to function descriptor handling and their use in LKDTM. From Christophe's cover letter: Fix LKDTM for PPC64/IA64/PARISC PPC64/IA64/PARISC have function descriptors. LKDTM doesn't work on those three architectures because LKDTM messes up function descriptors with functions. This series does some cleanup in the three architectures and refactors function descriptors so that it can then easily use it in a generic way in LKDTM.
Diffstat (limited to 'arch/powerpc/kernel/ptrace')
-rw-r--r--arch/powerpc/kernel/ptrace/ptrace.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/ptrace/ptrace.c b/arch/powerpc/kernel/ptrace/ptrace.c
index c43f77e2ac31..1212a812a7ab 100644
--- a/arch/powerpc/kernel/ptrace/ptrace.c
+++ b/arch/powerpc/kernel/ptrace/ptrace.c
@@ -445,4 +445,10 @@ void __init pt_regs_check(void)
* real registers.
*/
BUILD_BUG_ON(PT_DSCR < sizeof(struct user_pt_regs) / sizeof(unsigned long));
+
+#ifdef PPC64_ELF_ABI_v1
+ BUILD_BUG_ON(!IS_ENABLED(CONFIG_HAVE_FUNCTION_DESCRIPTORS));
+#else
+ BUILD_BUG_ON(IS_ENABLED(CONFIG_HAVE_FUNCTION_DESCRIPTORS));
+#endif
}