Re: [PATCH] x86: panic when a kernel stack overflow is detected

2019-07-29 Thread Peter Zijlstra
On Sun, Jul 28, 2019 at 08:53:58PM -0700, Andy Lutomirski wrote: > On Sun, Jul 28, 2019 at 6:59 PM Daniel Axtens wrote: > > > > Currently, when a kernel stack overflow is detected via VMAP_STACK, > > the task is killed with die(). > > > > This isn't safe, because we don't know how that process has

Re: [PATCH] x86: panic when a kernel stack overflow is detected

2019-07-28 Thread Andy Lutomirski
On Sun, Jul 28, 2019 at 6:59 PM Daniel Axtens wrote: > > Currently, when a kernel stack overflow is detected via VMAP_STACK, > the task is killed with die(). > > This isn't safe, because we don't know how that process has affected > kernel state. In particular, we don't know what locks have been t

[PATCH] x86: panic when a kernel stack overflow is detected

2019-07-28 Thread Daniel Axtens
Currently, when a kernel stack overflow is detected via VMAP_STACK, the task is killed with die(). This isn't safe, because we don't know how that process has affected kernel state. In particular, we don't know what locks have been taken. For example, we can hit a case with lkdtm where a thread ta