[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190323184521.a443cc741997cb0d3ed26395@kernel.org>
Date: Sat, 23 Mar 2019 18:45:21 +0900
From: Masami Hiramatsu <mhiramat@...nel.org>
To: Andi Kleen <andi@...stfloor.org>
Cc: x86@...nel.org, akpm@...ux-foundation.org,
linux-kernel@...r.kernel.org, Andi Kleen <ak@...ux.intel.com>,
mhiramat@...nel.org
Subject: Re: [PATCH 11/17] x86/kprobes: Make trampoline_handler global and
visible
On Thu, 21 Mar 2019 15:00:03 -0700
Andi Kleen <andi@...stfloor.org> wrote:
> From: Andi Kleen <ak@...ux.intel.com>
>
> This function is referenced from assembler, so in LTO
> it needs to be global and visible to not be optimized away.
>
I got it.
Acked-by: Masami Hiramatsu <mhiramat@...nel.org>
Andi, out of curiousity, that is not only for x86, but
does all arch have to care it?
Thank you,
> Cc: mhiramat@...nel.org
> Signed-off-by: Andi Kleen <ak@...ux.intel.com>
> ---
> arch/x86/kernel/kprobes/core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/kernel/kprobes/core.c b/arch/x86/kernel/kprobes/core.c
> index 31ab91c9c4e9..1309a4eb3119 100644
> --- a/arch/x86/kernel/kprobes/core.c
> +++ b/arch/x86/kernel/kprobes/core.c
> @@ -752,7 +752,7 @@ STACK_FRAME_NON_STANDARD(kretprobe_trampoline);
> /*
> * Called from kretprobe_trampoline
> */
> -static __used void *trampoline_handler(struct pt_regs *regs)
> +__used __visible void *trampoline_handler(struct pt_regs *regs)
> {
> struct kretprobe_instance *ri = NULL;
> struct hlist_head *head, empty_rp;
> --
> 2.20.1
>
--
Masami Hiramatsu <mhiramat@...nel.org>
Powered by blists - more mailing lists