Re: [patch V2 28/29] x86/irq/64: Remap the IRQ stack with guard pages

2019-04-08 Thread Thomas Gleixner
On Mon, 8 Apr 2019, Thomas Gleixner wrote: > On Mon, 8 Apr 2019, Andy Lutomirski wrote: > > On Sun, Apr 7, 2019 at 11:46 PM Thomas Gleixner wrote: > > > > > > On Sun, 7 Apr 2019, Andy Lutomirski wrote: > > > > On Sun, Apr 7, 2019 at 3:44 PM Thomas Gleixner > > > > wrote: > > > > > Actually we h

Re: [patch V2 28/29] x86/irq/64: Remap the IRQ stack with guard pages

2019-04-08 Thread Thomas Gleixner
On Mon, 8 Apr 2019, Andy Lutomirski wrote: > On Sun, Apr 7, 2019 at 11:46 PM Thomas Gleixner wrote: > > > > On Sun, 7 Apr 2019, Andy Lutomirski wrote: > > > On Sun, Apr 7, 2019 at 3:44 PM Thomas Gleixner wrote: > > > > Actually we have: save_stack_trace() > > > > > > > > > > Like I did here: > >

Re: [patch V2 28/29] x86/irq/64: Remap the IRQ stack with guard pages

2019-04-08 Thread Josh Poimboeuf
On Mon, Apr 08, 2019 at 09:18:00AM -0700, Andy Lutomirski wrote: > On Sun, Apr 7, 2019 at 11:46 PM Thomas Gleixner wrote: > > > > On Sun, 7 Apr 2019, Andy Lutomirski wrote: > > > On Sun, Apr 7, 2019 at 3:44 PM Thomas Gleixner wrote: > > > > Actually we have: save_stack_trace() > > > > > > > > > >

Re: [patch V2 28/29] x86/irq/64: Remap the IRQ stack with guard pages

2019-04-08 Thread Andy Lutomirski
On Sun, Apr 7, 2019 at 11:46 PM Thomas Gleixner wrote: > > On Sun, 7 Apr 2019, Andy Lutomirski wrote: > > On Sun, Apr 7, 2019 at 3:44 PM Thomas Gleixner wrote: > > > Actually we have: save_stack_trace() > > > > > > > Like I did here: > > > > https://git.kernel.org/pub/scm/linux/kernel/git/luto/li

Re: [patch V2 28/29] x86/irq/64: Remap the IRQ stack with guard pages

2019-04-07 Thread Thomas Gleixner
On Sun, 7 Apr 2019, Andy Lutomirski wrote: > On Sun, Apr 7, 2019 at 3:44 PM Thomas Gleixner wrote: > > Actually we have: save_stack_trace() > > > > Like I did here: > > https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git/log/?h=WIP.x86/stackguards Kinda, but what that code wants is t

Re: [patch V2 28/29] x86/irq/64: Remap the IRQ stack with guard pages

2019-04-07 Thread Andy Lutomirski
On Sun, Apr 7, 2019 at 3:44 PM Thomas Gleixner wrote: > > On Sat, 6 Apr 2019, Andy Lutomirski wrote: > > On Fri, Apr 5, 2019 at 8:11 AM Thomas Gleixner wrote: > > > > > > From: Andy Lutomirski > > > > > > The IRQ stack lives in percpu space, so an IRQ handler that overflows it > > > will overwri

Re: [patch V2 28/29] x86/irq/64: Remap the IRQ stack with guard pages

2019-04-07 Thread Thomas Gleixner
On Sat, 6 Apr 2019, Andy Lutomirski wrote: > On Fri, Apr 5, 2019 at 8:11 AM Thomas Gleixner wrote: > > > > From: Andy Lutomirski > > > > The IRQ stack lives in percpu space, so an IRQ handler that overflows it > > will overwrite other data structures. > > > > Use vmap() to remap the IRQ stack so

Re: [patch V2 28/29] x86/irq/64: Remap the IRQ stack with guard pages

2019-04-07 Thread Andy Lutomirski
> On Apr 7, 2019, at 2:34 AM, Thomas Gleixner wrote: > > On Sun, 7 Apr 2019, Andy Lutomirski wrote: >>> On Apr 6, 2019, at 11:08 PM, Thomas Gleixner wrote: >>> > On Sat, 6 Apr 2019, Andy Lutomirski wrote: > On Fri, Apr 5, 2019 at 8:11 AM Thomas Gleixner wrote: > > From: Andy

Re: [patch V2 28/29] x86/irq/64: Remap the IRQ stack with guard pages

2019-04-07 Thread Thomas Gleixner
On Sun, 7 Apr 2019, Andy Lutomirski wrote: > > On Apr 6, 2019, at 11:08 PM, Thomas Gleixner wrote: > > > >> On Sat, 6 Apr 2019, Andy Lutomirski wrote: > >>> On Fri, Apr 5, 2019 at 8:11 AM Thomas Gleixner wrote: > >>> > >>> From: Andy Lutomirski > >>> > >>> The IRQ stack lives in percpu space,

Re: [patch V2 28/29] x86/irq/64: Remap the IRQ stack with guard pages

2019-04-07 Thread Andy Lutomirski
> On Apr 6, 2019, at 11:08 PM, Thomas Gleixner wrote: > >> On Sat, 6 Apr 2019, Andy Lutomirski wrote: >>> On Fri, Apr 5, 2019 at 8:11 AM Thomas Gleixner wrote: >>> >>> From: Andy Lutomirski >>> >>> The IRQ stack lives in percpu space, so an IRQ handler that overflows it >>> will overwrite

Re: [patch V2 28/29] x86/irq/64: Remap the IRQ stack with guard pages

2019-04-06 Thread Thomas Gleixner
On Sat, 6 Apr 2019, Andy Lutomirski wrote: > On Fri, Apr 5, 2019 at 8:11 AM Thomas Gleixner wrote: > > > > From: Andy Lutomirski > > > > The IRQ stack lives in percpu space, so an IRQ handler that overflows it > > will overwrite other data structures. > > > > Use vmap() to remap the IRQ stack so

Re: [patch V2 28/29] x86/irq/64: Remap the IRQ stack with guard pages

2019-04-06 Thread Andy Lutomirski
On Fri, Apr 5, 2019 at 8:11 AM Thomas Gleixner wrote: > > From: Andy Lutomirski > > The IRQ stack lives in percpu space, so an IRQ handler that overflows it > will overwrite other data structures. > > Use vmap() to remap the IRQ stack so that it will have the usual guard > pages that vmap/vmalloc

[patch V2 28/29] x86/irq/64: Remap the IRQ stack with guard pages

2019-04-05 Thread Thomas Gleixner
From: Andy Lutomirski The IRQ stack lives in percpu space, so an IRQ handler that overflows it will overwrite other data structures. Use vmap() to remap the IRQ stack so that it will have the usual guard pages that vmap/vmalloc allocations have. With this the kernel will panic immediately on an