Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1665510 > unrolled thread
| Started by | Jiri Slaby <jslaby@suse.cz> |
|---|---|
| First post | 2017-06-14 09:30 +0200 |
| Last post | 2017-06-14 15:10 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [RFC PATCH 02/10] objtool, x86: add several functions and files to the objtool whitelist Jiri Slaby <jslaby@suse.cz> - 2017-06-14 09:30 +0200
Re: [RFC PATCH 02/10] objtool, x86: add several functions and files to the objtool whitelist Josh Poimboeuf <jpoimboe@redhat.com> - 2017-06-14 15:10 +0200
| From | Jiri Slaby <jslaby@suse.cz> |
|---|---|
| Date | 2017-06-14 09:30 +0200 |
| Subject | Re: [RFC PATCH 02/10] objtool, x86: add several functions and files to the objtool whitelist |
| Message-ID | <tSaUy-2dU-19@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | Josh Poimboeuf <jpoimboe@redhat.com> |
|---|---|
| Date | 2017-06-14 15:10 +0200 |
| Message-ID | <tSgdz-5BT-15@gated-at.bofh.it> |
| In reply to | #1665510 |
On Wed, Jun 14, 2017 at 09:24:39AM +0200, Jiri Slaby wrote: > 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? I tried to do that, but the STACK_FRAME_NON_STANDARD macro needs a function, and optprobe_template_entry is defined elsewhere as a data symbol with a type of kprobe_opcode_t. So I had to wrap the asm code inside a function. -- Josh
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web