From: Andi Kleen Date: Sat, 30 Mar 2019 00:47:41 +0000 (-0700) Subject: x86/kprobes: Make trampoline_handler() global and visible X-Git-Tag: v5.4-rc1~960^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0e72499c3cc0cead32f88b94a02204d2b80768bf;p=platform%2Fkernel%2Flinux-rpi.git x86/kprobes: Make trampoline_handler() global and visible This function is referenced from assembler, so in LTO it needs to be global and visible to not be optimized away. Signed-off-by: Andi Kleen Signed-off-by: Thomas Gleixner Acked-by: Masami Hiramatsu Link: https://lkml.kernel.org/r/20190330004743.29541-7-andi@firstfloor.org Signed-off-by: Ingo Molnar --- diff --git a/arch/x86/kernel/kprobes/core.c b/arch/x86/kernel/kprobes/core.c index cf52ee0..9e4fa24 100644 --- a/arch/x86/kernel/kprobes/core.c +++ b/arch/x86/kernel/kprobes/core.c @@ -768,7 +768,7 @@ static struct kprobe kretprobe_kprobe = { /* * Called from kretprobe_trampoline */ -static __used void *trampoline_handler(struct pt_regs *regs) +__used __visible void *trampoline_handler(struct pt_regs *regs) { struct kprobe_ctlblk *kcb; struct kretprobe_instance *ri = NULL;