Re: [BUG 4.2-rc8] Interrupt occurs while apply_alternatives() is patching the handler

2015-09-05 Thread Borislav Petkov
On Fri, Sep 04, 2015 at 03:37:24PM +0200, Thomas Gleixner wrote: > I pondered the buffer/text_poke variant, but that's too much of a > hassle for a fix supposed to go to stable. True. > Resourcewise you could use the buffer which is available in > apply_alternatives anyway. I'll poke at it when

Re: [BUG 4.2-rc8] Interrupt occurs while apply_alternatives() is patching the handler

2015-09-05 Thread Borislav Petkov
On Fri, Sep 04, 2015 at 03:37:24PM +0200, Thomas Gleixner wrote: > I pondered the buffer/text_poke variant, but that's too much of a > hassle for a fix supposed to go to stable. True. > Resourcewise you could use the buffer which is available in > apply_alternatives anyway. I'll poke at it when

Re: [BUG 4.2-rc8] Interrupt occurs while apply_alternatives() is patching the handler

2015-09-04 Thread Thomas Gleixner
On Fri, 4 Sep 2015, Borislav Petkov wrote: > On Thu, Sep 03, 2015 at 12:41:47PM +0200, Thomas Gleixner wrote: > > Nah. I rather put the local_irq_save into optimize_nops(). All other > > callers of add_nops() are operating on a buffer and use text_poke > > after that. Aside of that optimize_nops()

Re: [BUG 4.2-rc8] Interrupt occurs while apply_alternatives() is patching the handler

2015-09-04 Thread Borislav Petkov
On Thu, Sep 03, 2015 at 12:41:47PM +0200, Thomas Gleixner wrote: > Nah. I rather put the local_irq_save into optimize_nops(). All other > callers of add_nops() are operating on a buffer and use text_poke > after that. Aside of that optimize_nops() is missing a sync_core(). Whoops. > Updated

Re: [BUG 4.2-rc8] Interrupt occurs while apply_alternatives() is patching the handler

2015-09-04 Thread Richard W.M. Jones
On Thu, Sep 03, 2015 at 12:41:47PM +0200, Thomas Gleixner wrote: > On Thu, 3 Sep 2015, Borislav Petkov wrote: > > On Wed, Sep 02, 2015 at 11:11:55AM +0200, Thomas Gleixner wrote: > > > static void __init_or_module add_nops(void *insns, unsigned int len) > > > { > > > + unsigned long flags; > > >

Re: [BUG 4.2-rc8] Interrupt occurs while apply_alternatives() is patching the handler

2015-09-04 Thread Borislav Petkov
On Thu, Sep 03, 2015 at 12:41:47PM +0200, Thomas Gleixner wrote: > Nah. I rather put the local_irq_save into optimize_nops(). All other > callers of add_nops() are operating on a buffer and use text_poke > after that. Aside of that optimize_nops() is missing a sync_core(). Whoops. > Updated

Re: [BUG 4.2-rc8] Interrupt occurs while apply_alternatives() is patching the handler

2015-09-04 Thread Thomas Gleixner
On Fri, 4 Sep 2015, Borislav Petkov wrote: > On Thu, Sep 03, 2015 at 12:41:47PM +0200, Thomas Gleixner wrote: > > Nah. I rather put the local_irq_save into optimize_nops(). All other > > callers of add_nops() are operating on a buffer and use text_poke > > after that. Aside of that optimize_nops()

Re: [BUG 4.2-rc8] Interrupt occurs while apply_alternatives() is patching the handler

2015-09-04 Thread Richard W.M. Jones
On Thu, Sep 03, 2015 at 12:41:47PM +0200, Thomas Gleixner wrote: > On Thu, 3 Sep 2015, Borislav Petkov wrote: > > On Wed, Sep 02, 2015 at 11:11:55AM +0200, Thomas Gleixner wrote: > > > static void __init_or_module add_nops(void *insns, unsigned int len) > > > { > > > + unsigned long flags; > > >

Re: [BUG 4.2-rc8] Interrupt occurs while apply_alternatives() is patching the handler

2015-09-03 Thread Richard W.M. Jones
On Thu, Sep 03, 2015 at 12:41:47PM +0200, Thomas Gleixner wrote: > On Thu, 3 Sep 2015, Borislav Petkov wrote: > > On Wed, Sep 02, 2015 at 11:11:55AM +0200, Thomas Gleixner wrote: > > > static void __init_or_module add_nops(void *insns, unsigned int len) > > > { > > > + unsigned long flags; > > >

Re: [BUG 4.2-rc8] Interrupt occurs while apply_alternatives() is patching the handler

2015-09-03 Thread Thomas Gleixner
On Thu, 3 Sep 2015, Josh Boyer wrote: > > Fixes: 4fd4b6e5537c 'x86/alternatives: Use optimized NOPs for padding' > > Possibly CC: stable since it fixes a commit in 4.1 and 4.2? Indeed. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to

Re: [BUG 4.2-rc8] Interrupt occurs while apply_alternatives() is patching the handler

2015-09-03 Thread Josh Boyer
On Thu, Sep 3, 2015 at 6:41 AM, Thomas Gleixner wrote: > On Thu, 3 Sep 2015, Borislav Petkov wrote: >> On Wed, Sep 02, 2015 at 11:11:55AM +0200, Thomas Gleixner wrote: >> > static void __init_or_module add_nops(void *insns, unsigned int len) >> > { >> > + unsigned long flags; >> > + >> > +

Re: [BUG 4.2-rc8] Interrupt occurs while apply_alternatives() is patching the handler

2015-09-03 Thread Thomas Gleixner
On Thu, 3 Sep 2015, Borislav Petkov wrote: > On Wed, Sep 02, 2015 at 11:11:55AM +0200, Thomas Gleixner wrote: > > static void __init_or_module add_nops(void *insns, unsigned int len) > > { > > + unsigned long flags; > > + > > + local_irq_save(flags); > > while (len > 0) { > > I guess

Re: [BUG 4.2-rc8] Interrupt occurs while apply_alternatives() is patching the handler

2015-09-03 Thread Borislav Petkov
On Wed, Sep 02, 2015 at 11:11:55AM +0200, Thomas Gleixner wrote: > On Tue, 1 Sep 2015, Richard W.M. Jones wrote: > > On Sun, Aug 30, 2015 at 10:37:57PM -0400, Chuck Ebbert wrote: > > > This is from https://bugzilla.redhat.com/show_bug.cgi?id=1258223 > > > > > > [0.036000] BUG: unable to

Re: [BUG 4.2-rc8] Interrupt occurs while apply_alternatives() is patching the handler

2015-09-03 Thread Richard W.M. Jones
On Wed, Sep 02, 2015 at 08:05:12PM +0100, Richard W.M. Jones wrote: > On Wed, Sep 02, 2015 at 11:11:55AM +0200, Thomas Gleixner wrote: > > On Tue, 1 Sep 2015, Richard W.M. Jones wrote: > > > On Sun, Aug 30, 2015 at 10:37:57PM -0400, Chuck Ebbert wrote: > > > > This is from

Re: [BUG 4.2-rc8] Interrupt occurs while apply_alternatives() is patching the handler

2015-09-03 Thread Richard W.M. Jones
On Thu, Sep 03, 2015 at 12:41:47PM +0200, Thomas Gleixner wrote: > On Thu, 3 Sep 2015, Borislav Petkov wrote: > > On Wed, Sep 02, 2015 at 11:11:55AM +0200, Thomas Gleixner wrote: > > > static void __init_or_module add_nops(void *insns, unsigned int len) > > > { > > > + unsigned long flags; > > >

Re: [BUG 4.2-rc8] Interrupt occurs while apply_alternatives() is patching the handler

2015-09-03 Thread Borislav Petkov
On Wed, Sep 02, 2015 at 11:11:55AM +0200, Thomas Gleixner wrote: > On Tue, 1 Sep 2015, Richard W.M. Jones wrote: > > On Sun, Aug 30, 2015 at 10:37:57PM -0400, Chuck Ebbert wrote: > > > This is from https://bugzilla.redhat.com/show_bug.cgi?id=1258223 > > > > > > [0.036000] BUG: unable to

Re: [BUG 4.2-rc8] Interrupt occurs while apply_alternatives() is patching the handler

2015-09-03 Thread Richard W.M. Jones
On Wed, Sep 02, 2015 at 08:05:12PM +0100, Richard W.M. Jones wrote: > On Wed, Sep 02, 2015 at 11:11:55AM +0200, Thomas Gleixner wrote: > > On Tue, 1 Sep 2015, Richard W.M. Jones wrote: > > > On Sun, Aug 30, 2015 at 10:37:57PM -0400, Chuck Ebbert wrote: > > > > This is from

Re: [BUG 4.2-rc8] Interrupt occurs while apply_alternatives() is patching the handler

2015-09-03 Thread Thomas Gleixner
On Thu, 3 Sep 2015, Borislav Petkov wrote: > On Wed, Sep 02, 2015 at 11:11:55AM +0200, Thomas Gleixner wrote: > > static void __init_or_module add_nops(void *insns, unsigned int len) > > { > > + unsigned long flags; > > + > > + local_irq_save(flags); > > while (len > 0) { > > I guess

Re: [BUG 4.2-rc8] Interrupt occurs while apply_alternatives() is patching the handler

2015-09-03 Thread Thomas Gleixner
On Thu, 3 Sep 2015, Josh Boyer wrote: > > Fixes: 4fd4b6e5537c 'x86/alternatives: Use optimized NOPs for padding' > > Possibly CC: stable since it fixes a commit in 4.1 and 4.2? Indeed. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to

Re: [BUG 4.2-rc8] Interrupt occurs while apply_alternatives() is patching the handler

2015-09-03 Thread Josh Boyer
On Thu, Sep 3, 2015 at 6:41 AM, Thomas Gleixner wrote: > On Thu, 3 Sep 2015, Borislav Petkov wrote: >> On Wed, Sep 02, 2015 at 11:11:55AM +0200, Thomas Gleixner wrote: >> > static void __init_or_module add_nops(void *insns, unsigned int len) >> > { >> > + unsigned long

Re: [BUG 4.2-rc8] Interrupt occurs while apply_alternatives() is patching the handler

2015-09-02 Thread Richard W.M. Jones
On Wed, Sep 02, 2015 at 11:11:55AM +0200, Thomas Gleixner wrote: > On Tue, 1 Sep 2015, Richard W.M. Jones wrote: > > On Sun, Aug 30, 2015 at 10:37:57PM -0400, Chuck Ebbert wrote: > > > This is from https://bugzilla.redhat.com/show_bug.cgi?id=1258223 > > > > > > [0.036000] BUG: unable to

Re: [BUG 4.2-rc8] Interrupt occurs while apply_alternatives() is patching the handler

2015-09-02 Thread Thomas Gleixner
On Tue, 1 Sep 2015, Richard W.M. Jones wrote: > On Sun, Aug 30, 2015 at 10:37:57PM -0400, Chuck Ebbert wrote: > > This is from https://bugzilla.redhat.com/show_bug.cgi?id=1258223 > > > > [0.036000] BUG: unable to handle kernel paging request at 55501e06 > [...] > > [0.036000] [] ?

Re: [BUG 4.2-rc8] Interrupt occurs while apply_alternatives() is patching the handler

2015-09-02 Thread Thomas Gleixner
On Tue, 1 Sep 2015, Richard W.M. Jones wrote: > On Sun, Aug 30, 2015 at 10:37:57PM -0400, Chuck Ebbert wrote: > > This is from https://bugzilla.redhat.com/show_bug.cgi?id=1258223 > > > > [0.036000] BUG: unable to handle kernel paging request at 55501e06 > [...] > > [0.036000] [] ?

Re: [BUG 4.2-rc8] Interrupt occurs while apply_alternatives() is patching the handler

2015-09-02 Thread Richard W.M. Jones
On Wed, Sep 02, 2015 at 11:11:55AM +0200, Thomas Gleixner wrote: > On Tue, 1 Sep 2015, Richard W.M. Jones wrote: > > On Sun, Aug 30, 2015 at 10:37:57PM -0400, Chuck Ebbert wrote: > > > This is from https://bugzilla.redhat.com/show_bug.cgi?id=1258223 > > > > > > [0.036000] BUG: unable to

Re: [BUG 4.2-rc8] Interrupt occurs while apply_alternatives() is patching the handler

2015-09-01 Thread Richard W.M. Jones
On Sun, Aug 30, 2015 at 10:37:57PM -0400, Chuck Ebbert wrote: > This is from https://bugzilla.redhat.com/show_bug.cgi?id=1258223 > > [0.036000] BUG: unable to handle kernel paging request at 55501e06 [...] > [0.036000] [] ? add_nops+0x90/0xa0 > [0.036000] []

Re: [BUG 4.2-rc8] Interrupt occurs while apply_alternatives() is patching the handler

2015-09-01 Thread Richard W.M. Jones
On Sun, Aug 30, 2015 at 10:37:57PM -0400, Chuck Ebbert wrote: > This is from https://bugzilla.redhat.com/show_bug.cgi?id=1258223 > > [0.036000] BUG: unable to handle kernel paging request at 55501e06 [...] > [0.036000] [] ? add_nops+0x90/0xa0 > [0.036000] []

[BUG 4.2-rc8] Interrupt occurs while apply_alternatives() is patching the handler

2015-08-30 Thread Chuck Ebbert
This is from https://bugzilla.redhat.com/show_bug.cgi?id=1258223 [0.036000] BUG: unable to handle kernel paging request at 55501e06 [0.036000] IP: [] common_interrupt+0xb/0x38 [0.036000] *pde = [0.036000] Oops: [#1] SMP [0.036000] Modules linked in: [

[BUG 4.2-rc8] Interrupt occurs while apply_alternatives() is patching the handler

2015-08-30 Thread Chuck Ebbert
This is from https://bugzilla.redhat.com/show_bug.cgi?id=1258223 [0.036000] BUG: unable to handle kernel paging request at 55501e06 [0.036000] IP: [c0aae48b] common_interrupt+0xb/0x38 [0.036000] *pde = [0.036000] Oops: [#1] SMP [0.036000] Modules linked in: [