Re: [PATCH v2] rslib: Remove VLAs by setting upper bound on nroots

2018-03-28 Thread Thomas Gleixner
On Wed, 28 Mar 2018, Thomas Gleixner wrote: > On Tue, 27 Mar 2018, Kees Cook wrote: > > > > I guess if we put this storage into the rs_control (rather than on the > > > stack) then we'd have to worry about concurrent uses of it. It looks > > > like all the other fields are immutable once it's

Re: [PATCH v2] rslib: Remove VLAs by setting upper bound on nroots

2018-03-28 Thread Thomas Gleixner
On Wed, 28 Mar 2018, Thomas Gleixner wrote: > On Tue, 27 Mar 2018, Kees Cook wrote: > > > > I guess if we put this storage into the rs_control (rather than on the > > > stack) then we'd have to worry about concurrent uses of it. It looks > > > like all the other fields are immutable once it's

Re: [PATCH v2] rslib: Remove VLAs by setting upper bound on nroots

2018-03-28 Thread Thomas Gleixner
On Tue, 27 Mar 2018, Kees Cook wrote: > On Tue, Mar 27, 2018 at 4:45 PM, Andrew Morton > wrote: > > On Mon, 26 Mar 2018 16:17:57 -0700 Kees Cook wrote: > > > >> On Fri, Mar 16, 2018 at 11:25 PM, Kees Cook wrote: > >> > On

Re: [PATCH v2] rslib: Remove VLAs by setting upper bound on nroots

2018-03-28 Thread Thomas Gleixner
On Tue, 27 Mar 2018, Kees Cook wrote: > On Tue, Mar 27, 2018 at 4:45 PM, Andrew Morton > wrote: > > On Mon, 26 Mar 2018 16:17:57 -0700 Kees Cook wrote: > > > >> On Fri, Mar 16, 2018 at 11:25 PM, Kees Cook wrote: > >> > On Fri, Mar 16, 2018 at 3:59 PM, Andrew Morton > >> > wrote: > >> >> On

Re: [PATCH v2] rslib: Remove VLAs by setting upper bound on nroots

2018-03-27 Thread Kees Cook
On Tue, Mar 27, 2018 at 4:45 PM, Andrew Morton wrote: > On Mon, 26 Mar 2018 16:17:57 -0700 Kees Cook wrote: > >> On Fri, Mar 16, 2018 at 11:25 PM, Kees Cook wrote: >> > On Fri, Mar 16, 2018 at 3:59 PM, Andrew Morton >> >

Re: [PATCH v2] rslib: Remove VLAs by setting upper bound on nroots

2018-03-27 Thread Kees Cook
On Tue, Mar 27, 2018 at 4:45 PM, Andrew Morton wrote: > On Mon, 26 Mar 2018 16:17:57 -0700 Kees Cook wrote: > >> On Fri, Mar 16, 2018 at 11:25 PM, Kees Cook wrote: >> > On Fri, Mar 16, 2018 at 3:59 PM, Andrew Morton >> > wrote: >> >> On Thu, 15 Mar 2018 15:59:19 -0700 Kees Cook >> >> wrote:

Re: [PATCH v2] rslib: Remove VLAs by setting upper bound on nroots

2018-03-27 Thread Andrew Morton
On Mon, 26 Mar 2018 16:17:57 -0700 Kees Cook wrote: > On Fri, Mar 16, 2018 at 11:25 PM, Kees Cook wrote: > > On Fri, Mar 16, 2018 at 3:59 PM, Andrew Morton > > wrote: > >> On Thu, 15 Mar 2018 15:59:19 -0700 Kees Cook

Re: [PATCH v2] rslib: Remove VLAs by setting upper bound on nroots

2018-03-27 Thread Andrew Morton
On Mon, 26 Mar 2018 16:17:57 -0700 Kees Cook wrote: > On Fri, Mar 16, 2018 at 11:25 PM, Kees Cook wrote: > > On Fri, Mar 16, 2018 at 3:59 PM, Andrew Morton > > wrote: > >> On Thu, 15 Mar 2018 15:59:19 -0700 Kees Cook wrote: > >> > >>> Avoid stack VLAs[1] by always allocating the upper bound

Re: [PATCH v2] rslib: Remove VLAs by setting upper bound on nroots

2018-03-26 Thread Kees Cook
On Fri, Mar 16, 2018 at 11:25 PM, Kees Cook wrote: > On Fri, Mar 16, 2018 at 3:59 PM, Andrew Morton > wrote: >> On Thu, 15 Mar 2018 15:59:19 -0700 Kees Cook wrote: >> >>> Avoid stack VLAs[1] by always allocating the upper

Re: [PATCH v2] rslib: Remove VLAs by setting upper bound on nroots

2018-03-26 Thread Kees Cook
On Fri, Mar 16, 2018 at 11:25 PM, Kees Cook wrote: > On Fri, Mar 16, 2018 at 3:59 PM, Andrew Morton > wrote: >> On Thu, 15 Mar 2018 15:59:19 -0700 Kees Cook wrote: >> >>> Avoid stack VLAs[1] by always allocating the upper bound of stack space >>> needed. The existing users of rslib appear to

Re: [PATCH v2] rslib: Remove VLAs by setting upper bound on nroots

2018-03-17 Thread Kees Cook
On Fri, Mar 16, 2018 at 3:59 PM, Andrew Morton wrote: > On Thu, 15 Mar 2018 15:59:19 -0700 Kees Cook wrote: > >> Avoid stack VLAs[1] by always allocating the upper bound of stack space >> needed. The existing users of rslib appear to max out at

Re: [PATCH v2] rslib: Remove VLAs by setting upper bound on nroots

2018-03-17 Thread Kees Cook
On Fri, Mar 16, 2018 at 3:59 PM, Andrew Morton wrote: > On Thu, 15 Mar 2018 15:59:19 -0700 Kees Cook wrote: > >> Avoid stack VLAs[1] by always allocating the upper bound of stack space >> needed. The existing users of rslib appear to max out at 24 roots[2], >> so use that as the upper bound

Re: [PATCH v2] rslib: Remove VLAs by setting upper bound on nroots

2018-03-16 Thread Andrew Morton
On Thu, 15 Mar 2018 15:59:19 -0700 Kees Cook wrote: > Avoid stack VLAs[1] by always allocating the upper bound of stack space > needed. The existing users of rslib appear to max out at 24 roots[2], > so use that as the upper bound until we have a reason to change it. > >

Re: [PATCH v2] rslib: Remove VLAs by setting upper bound on nroots

2018-03-16 Thread Andrew Morton
On Thu, 15 Mar 2018 15:59:19 -0700 Kees Cook wrote: > Avoid stack VLAs[1] by always allocating the upper bound of stack space > needed. The existing users of rslib appear to max out at 24 roots[2], > so use that as the upper bound until we have a reason to change it. > > Alternative considered:

Re: [PATCH v2] rslib: Remove VLAs by setting upper bound on nroots

2018-03-16 Thread Andrew Morton
On Thu, 15 Mar 2018 15:59:19 -0700 Kees Cook wrote: > Avoid stack VLAs[1] by always allocating the upper bound of stack space > needed. The existing users of rslib appear to max out at 24 roots[2], > so use that as the upper bound until we have a reason to change it. > >

Re: [PATCH v2] rslib: Remove VLAs by setting upper bound on nroots

2018-03-16 Thread Andrew Morton
On Thu, 15 Mar 2018 15:59:19 -0700 Kees Cook wrote: > Avoid stack VLAs[1] by always allocating the upper bound of stack space > needed. The existing users of rslib appear to max out at 24 roots[2], > so use that as the upper bound until we have a reason to change it. > > Alternative considered:

[PATCH v2] rslib: Remove VLAs by setting upper bound on nroots

2018-03-15 Thread Kees Cook
Avoid stack VLAs[1] by always allocating the upper bound of stack space needed. The existing users of rslib appear to max out at 24 roots[2], so use that as the upper bound until we have a reason to change it. Alternative considered: make init_rs() a true caller-instance and pre-allocate the

[PATCH v2] rslib: Remove VLAs by setting upper bound on nroots

2018-03-15 Thread Kees Cook
Avoid stack VLAs[1] by always allocating the upper bound of stack space needed. The existing users of rslib appear to max out at 24 roots[2], so use that as the upper bound until we have a reason to change it. Alternative considered: make init_rs() a true caller-instance and pre-allocate the