aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel/ptrace
diff options
context:
space:
mode:
authorMichael Ellerman2022-03-07 23:34:32 +1100
committerMichael Ellerman2022-03-07 23:34:32 +1100
commit4bc06c59f62d3d376294f92cf808fc889b3ff431 (patch)
treec5b177975b0f7da164e63f0188665d6d245ff073 /arch/powerpc/kernel/ptrace
parent8219d31effa7be5dbc7ff915d7970672e028c701 (diff)
parent5e5a6c5441654d1b9e576ce4ca8a1759e701079e (diff)
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
}