summaryrefslogtreecommitdiff
path: root/kernel/debug/debug_core.h
diff options
context:
space:
mode:
authorBradley Morgan <brads@mainlining.org>2026-09-23 17:56:31 +0000
committerMadhavan Srinivasan <maddy@linux.ibm.com>2026-11-11 17:31:07 +0530
commitdc6eb6f08be536223e8289c7a8b1f515b1355721 (patch)
tree927d283bd651419baadc97c0b62b3d7a0ce2e86d /kernel/debug/debug_core.h
parentd513ec3c907b067d4a32b14ec6f73c3e041cb136 (diff)
powerpc32/modules: Reserve a PLT entry for ftrace_regs_caller
Commit 7dfbfb87c243 ("powerpc/ftrace: Activate HAVE_DYNAMIC_FTRACE_WITH_REGS on PPC32") made count_relocs() undercount the PLT entries the loader consumes: module_finalize_ftrace() now creates two trampolines (mod->arch.tramp for ftrace_caller() and mod->arch.tramp_regs for ftrace_regs_caller()), while count_relocs() reserves only one entry for ftrace. So the core .plt ends up one ppc_plt_entry (16 bytes) short. The walk in do_plt_call() scans for a free slot with "while (entry->jump[0])" and has no bound check, so once the last reserved slot is used up, the walk steps past the end of the section and patch_instruction() writes the 4-instruction trampoline into whatever module memory follows the .plt. Count the second entry, mirroring what module_64.c does for the same pair of stubs. Signed-off-by: Bradley Morgan <brads@mainlining.org> Fixes: 7dfbfb87c243 ("powerpc/ftrace: Activate HAVE_DYNAMIC_FTRACE_WITH_REGS on PPC32") Reviewed-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org> Cc: stable@vger.kernel.org Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com> Link: https://patch.msgid.link/20260923175631.235276-1-brads@mainlining.org
Diffstat (limited to 'kernel/debug/debug_core.h')
0 files changed, 0 insertions, 0 deletions