Re: [PATCH V4 5/9] x86/alternative: Split text_poke_bp() into tree steps

2019-02-21 Thread Steven Rostedt
On Fri, 15 Feb 2019 13:47:16 +0100 Daniel Bristot de Oliveira wrote: > On 2/8/19 1:15 AM, Steven Rostedt wrote: > > On Mon, 4 Feb 2019 20:58:58 +0100 > > Daniel Bristot de Oliveira wrote: > > > >> > >> +static void text_poke_bp_set_handler(void *addr, void *handler, > >> +

Re: [PATCH V4 5/9] x86/alternative: Split text_poke_bp() into tree steps

2019-02-15 Thread Daniel Bristot de Oliveira
On 2/8/19 1:15 AM, Steven Rostedt wrote: > On Mon, 4 Feb 2019 20:58:58 +0100 > Daniel Bristot de Oliveira wrote: > >> >> +static void text_poke_bp_set_handler(void *addr, void *handler, >> + unsigned char int3) >> +{ >> +bp_int3_handler = handler; >> +bp

Re: [PATCH V4 5/9] x86/alternative: Split text_poke_bp() into tree steps

2019-02-07 Thread Steven Rostedt
On Mon, 4 Feb 2019 20:58:58 +0100 Daniel Bristot de Oliveira wrote: > > +static void text_poke_bp_set_handler(void *addr, void *handler, > + unsigned char int3) > +{ > + bp_int3_handler = handler; > + bp_int3_addr = (u8 *)addr + sizeof(int3); > + te

Re: [PATCH V4 5/9] x86/alternative: Split text_poke_bp() into tree steps

2019-02-07 Thread Steven Rostedt
On Mon, 4 Feb 2019 20:58:58 +0100 Daniel Bristot de Oliveira wrote: > diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c > index d458c7973c56..202af29c43c0 100644 > --- a/arch/x86/kernel/alternative.c > +++ b/arch/x86/kernel/alternative.c > @@ -767,6 +767,29 @@ int poke_i

Re: [PATCH V4 5/9] x86/alternative: Split text_poke_bp() into tree steps

2019-02-06 Thread Borislav Petkov
On Mon, Feb 04, 2019 at 08:58:58PM +0100, Daniel Bristot de Oliveira wrote: > text_poke_bp() updates instructions on live kernel on SMP in three steps: > 1) add a int3 trap to the address that will be patched > 2) update all but the first byte of the patched range > 3) replace the first byte (in

[PATCH V4 5/9] x86/alternative: Split text_poke_bp() into tree steps

2019-02-04 Thread Daniel Bristot de Oliveira
text_poke_bp() updates instructions on live kernel on SMP in three steps: 1) add a int3 trap to the address that will be patched 2) update all but the first byte of the patched range 3) replace the first byte (int3) by the first byte of This patch creates one function for each of these steps.