Re: [kernel-hardening] Re: [PATCH v3 06/13] fork: Add generic vmalloced stack support

2016-07-11 Thread Andrey Ryabinin
2016-06-21 21:32 GMT+03:00 Rik van Riel : > On Tue, 2016-06-21 at 10:13 -0700, Kees Cook wrote: >> On Tue, Jun 21, 2016 at 9:59 AM, Andy Lutomirski > > wrote: >> > >> > I'm tempted to explicitly disallow VM_NO_GUARD in the vmalloc >> > range. >> > It has no in-tree users for non-fixed addresses rig

Re: [kernel-hardening] Re: [PATCH v3 06/13] fork: Add generic vmalloced stack support

2016-06-21 Thread Arnd Bergmann
On Tuesday, June 21, 2016 2:32:28 PM CEST Rik van Riel wrote: > On Tue, 2016-06-21 at 10:13 -0700, Kees Cook wrote: > > On Tue, Jun 21, 2016 at 9:59 AM, Andy Lutomirski > > wrote: > > > > > > I'm tempted to explicitly disallow VM_NO_GUARD in the vmalloc > > > range. > > > It has no in-tree users

Re: [kernel-hardening] Re: [PATCH v3 06/13] fork: Add generic vmalloced stack support

2016-06-21 Thread Andy Lutomirski
On Tue, Jun 21, 2016 at 12:44 PM, Arnd Bergmann wrote: > On Tuesday, June 21, 2016 2:32:28 PM CEST Rik van Riel wrote: >> On Tue, 2016-06-21 at 10:13 -0700, Kees Cook wrote: >> > On Tue, Jun 21, 2016 at 9:59 AM, Andy Lutomirski > > > wrote: >> > > >> > > I'm tempted to explicitly disallow VM_NO_GU

Re: [kernel-hardening] Re: [PATCH v3 06/13] fork: Add generic vmalloced stack support

2016-06-21 Thread Rik van Riel
On Tue, 2016-06-21 at 10:13 -0700, Kees Cook wrote: > On Tue, Jun 21, 2016 at 9:59 AM, Andy Lutomirski > wrote: > >  > > I'm tempted to explicitly disallow VM_NO_GUARD in the vmalloc > > range. > > It has no in-tree users for non-fixed addresses right now. > What about the lack of pre-range guard

Re: [PATCH v3 06/13] fork: Add generic vmalloced stack support

2016-06-21 Thread Andy Lutomirski
On Tue, Jun 21, 2016 at 10:13 AM, Kees Cook wrote: > On Tue, Jun 21, 2016 at 9:59 AM, Andy Lutomirski wrote: >> On Tue, Jun 21, 2016 at 12:30 AM, Jann Horn wrote: >>> On Tue, Jun 21, 2016 at 1:43 AM, Andy Lutomirski wrote: If CONFIG_VMAP_STACK is selected, kernel stacks are allocated with

Re: [PATCH v3 06/13] fork: Add generic vmalloced stack support

2016-06-21 Thread Kees Cook
On Tue, Jun 21, 2016 at 9:59 AM, Andy Lutomirski wrote: > On Tue, Jun 21, 2016 at 12:30 AM, Jann Horn wrote: >> On Tue, Jun 21, 2016 at 1:43 AM, Andy Lutomirski wrote: >>> If CONFIG_VMAP_STACK is selected, kernel stacks are allocated with >>> vmalloc_node. >> [...] >>> static struct thread_info

Re: [PATCH v3 06/13] fork: Add generic vmalloced stack support

2016-06-21 Thread Andy Lutomirski
On Tue, Jun 21, 2016 at 12:30 AM, Jann Horn wrote: > On Tue, Jun 21, 2016 at 1:43 AM, Andy Lutomirski wrote: >> If CONFIG_VMAP_STACK is selected, kernel stacks are allocated with >> vmalloc_node. > [...] >> static struct thread_info *alloc_thread_info_node(struct task_struct *tsk, >>

Re: [PATCH v3 06/13] fork: Add generic vmalloced stack support

2016-06-21 Thread Jann Horn
On Tue, Jun 21, 2016 at 1:43 AM, Andy Lutomirski wrote: > If CONFIG_VMAP_STACK is selected, kernel stacks are allocated with > vmalloc_node. [...] > static struct thread_info *alloc_thread_info_node(struct task_struct *tsk, > int node) > { > +#if

[PATCH v3 06/13] fork: Add generic vmalloced stack support

2016-06-20 Thread Andy Lutomirski
If CONFIG_VMAP_STACK is selected, kernel stacks are allocated with vmalloc_node. Signed-off-by: Andy Lutomirski --- arch/Kconfig| 29 + arch/ia64/include/asm/thread_info.h | 2 +- include/linux/sched.h | 15 +++ kernel/fork.c