[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b380123a-aefd-45cd-ada4-ae9aeda96f82@suse.cz>
Date: Wed, 14 Jun 2017 09:24:39 +0200
From: Jiri Slaby <jslaby@...e.cz>
To: Josh Poimboeuf <jpoimboe@...hat.com>, x86@...nel.org
Cc: linux-kernel@...r.kernel.org, live-patching@...r.kernel.org,
Linus Torvalds <torvalds@...ux-foundation.org>,
Andy Lutomirski <luto@...nel.org>,
Ingo Molnar <mingo@...nel.org>,
"H. Peter Anvin" <hpa@...or.com>,
Peter Zijlstra <peterz@...radead.org>
Subject: Re: [RFC PATCH 02/10] objtool, x86: add several functions and files
to the objtool whitelist
On 06/01/2017, 07:44 AM, Josh Poimboeuf wrote:
...
> --- a/arch/x86/kernel/kprobes/opt.c
> +++ b/arch/x86/kernel/kprobes/opt.c
> @@ -28,6 +28,7 @@
> #include <linux/kdebug.h>
> #include <linux/kallsyms.h>
> #include <linux/ftrace.h>
> +#include <linux/frame.h>
>
> #include <asm/text-patching.h>
> #include <asm/cacheflush.h>
> @@ -94,6 +95,7 @@ static void synthesize_set_arg1(kprobe_opcode_t *addr, unsigned long val)
> }
>
> asm (
> + "optprobe_template_func:\n"
Why do you add another symbol here? What's wrong with
optprobe_template_entry?
> ".global optprobe_template_entry\n"
> "optprobe_template_entry:\n"
> #ifdef CONFIG_X86_64
> @@ -131,7 +133,12 @@ asm (
> " popf\n"
> #endif
> ".global optprobe_template_end\n"
> - "optprobe_template_end:\n");
> + "optprobe_template_end:\n"
> + ".type optprobe_template_func, @function\n"
> + ".size optprobe_template_func, .-optprobe_template_func\n");
> +
> +void optprobe_template_func(void);
> +STACK_FRAME_NON_STANDARD(optprobe_template_func);
>
> #define TMPL_MOVE_IDX \
> ((long)&optprobe_template_val - (long)&optprobe_template_entry)
thanks,
--
js
suse labs
Powered by blists - more mailing lists