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

2018-03-15 Thread Thomas Gleixner
On Sat, 10 Mar 2018, 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: make init_rs()

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

2018-03-10 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 works