Re: [PATCH v6 3/8] x86: add generic function to modify more calls using int3 framework

2014-01-21 Thread Steven Rostedt
On Tue, 21 Jan 2014 14:50:15 +0100 Petr Mladek wrote: > On Tue, 2014-01-14 at 19:33 -0500, Steven Rostedt wrote: > > > > > > /* Patch the first byte. We do not know how to recover from an error. */ > > > - text_poke_or_die(addr, opcode, sizeof(int3)); > > > + text_poke_or_die(addr, opcode, si

Re: [PATCH v6 3/8] x86: add generic function to modify more calls using int3 framework

2014-01-21 Thread Petr Mladek
On Tue, 2014-01-14 at 19:33 -0500, Steven Rostedt wrote: > On Tue, 10 Dec 2013 16:42:15 +0100 > Petr Mladek wrote: > > > diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c > > index 6436beec7b0c..8e57ac03a0e8 100644 > > --- a/arch/x86/kernel/alternative.c > > +++ b/arch/x8

Re: [PATCH v6 3/8] x86: add generic function to modify more calls using int3 framework

2014-01-15 Thread Steven Rostedt
On Wed, 15 Jan 2014 17:18:01 +0900 Masami Hiramatsu wrote: > >> +static char bp_int3; > > > > bp_int3 is not going to be anything but 0xcc. Let's change that to: > > > > static char bp_int3 = 0xcc; > > > > And remove the other initializations. > > just a comment. > If it is always 0xcc, it

Re: [PATCH v6 3/8] x86: add generic function to modify more calls using int3 framework

2014-01-15 Thread Masami Hiramatsu
(2014/01/15 9:33), Steven Rostedt wrote: > On Tue, 10 Dec 2013 16:42:15 +0100 > Petr Mladek wrote: > >> diff --git a/arch/x86/include/asm/alternative.h >> b/arch/x86/include/asm/alternative.h >> index 586747f5f41d..82ffe7e1529c 100644 >> --- a/arch/x86/include/asm/alternative.h >> +++ b/arch/x86

Re: [PATCH v6 3/8] x86: add generic function to modify more calls using int3 framework

2014-01-14 Thread Steven Rostedt
On Tue, 10 Dec 2013 16:42:15 +0100 Petr Mladek wrote: > diff --git a/arch/x86/include/asm/alternative.h > b/arch/x86/include/asm/alternative.h > index 586747f5f41d..82ffe7e1529c 100644 > --- a/arch/x86/include/asm/alternative.h > +++ b/arch/x86/include/asm/alternative.h > @@ -232,4 +232,40 @@ ex

[PATCH v6 3/8] x86: add generic function to modify more calls using int3 framework

2013-12-10 Thread Petr Mladek
The commit fd4363fff3d9 (x86: Introduce int3 (breakpoint)-based instruction patching) uses the same technique that has been used in ftrace since 08d636b ("ftrace/x86: Have arch x86_64 use breakpoints instead of stop machine") When trying to use text_poke_bp in dynamic ftrace, the process was signi