summaryrefslogtreecommitdiff
path: root/rust/kernel/mm/virt.rs
diff options
context:
space:
mode:
authorpanfan <panfan@qti.qualcomm.com>2025-09-04 20:22:36 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-09-09 19:02:28 +0200
commit6bb712ab084685ed156c09b9a6d9c89c21f2e98e (patch)
treed2e683c47e36ec0ea8c9428ccb2791ab2ce70f69 /rust/kernel/mm/virt.rs
parent01352cf09f6167503f176595be86cbea80fdb09a (diff)
arm64: ftrace: fix unreachable PLT for ftrace_caller in init_module with CONFIG_DYNAMIC_FTRACE
commit a7ed7b9d0ebb038db9963d574da0311cab0b666a upstream. On arm64, it has been possible for a module's sections to be placed more than 128M away from each other since commit: commit 3e35d303ab7d ("arm64: module: rework module VA range selection") Due to this, an ftrace callsite in a module's .init.text section can be out of branch range for the module's ftrace PLT entry (in the module's .text section). Any attempt to enable tracing of that callsite will result in a BRK being patched into the callsite, resulting in a fatal exception when the callsite is later executed. Fix this by adding an additional trampoline for .init.text, which will be within range. No additional trampolines are necessary due to the way a given module's executable sections are packed together. Any executable section beginning with ".init" will be placed in MOD_INIT_TEXT, and any other executable section, including those beginning with ".exit", will be placed in MOD_TEXT. Fixes: 3e35d303ab7d ("arm64: module: rework module VA range selection") Cc: <stable@vger.kernel.org> # 6.5.x Signed-off-by: panfan <panfan@qti.qualcomm.com> Acked-by: Mark Rutland <mark.rutland@arm.com> Link: https://lore.kernel.org/r/20250905032236.3220885-1-panfan@qti.qualcomm.com Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'rust/kernel/mm/virt.rs')
0 files changed, 0 insertions, 0 deletions