Date: Fri, 13 Apr 2018 20:55:53 -0600 From: David Brown <david.brown@...aro.org> To: Laura Abbott <labbott@...hat.com> Cc: Boris Ostrovsky <boris.ostrovsky@...cle.com>, Juergen Gross <jgross@...e.com>, Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>, "H. Peter Anvin" <hpa@...or.com>, x86@...nel.org, xen-devel@...ts.xenproject.org, linux-kernel@...r.kernel.org, kernel-hardening@...ts.openwall.com Subject: Re: [PATCH] x86/xen: Remove use of VLAs On Fri, Apr 13, 2018 at 03:11:46PM -0700, Laura Abbott wrote: >There's an ongoing effort to remove VLAs from the kernel to eventually >turn on -Wvla. The few VLAs in use have an upper bound based on a size >of 64K. This doesn't produce an excessively large stack so just switch >the upper bound. > > https://lkml.org/lkml/2018/3/7/621 This comment is more in regards to many of these patches, and not as much this one specifically. How confident are we in the upper bounds we're setting, and how obvious is it in the resulting code so that something does later change to overflow these bounds. The danger here is that we're converting something a little easier to detect (a stack overflow), with something harder to detect (overflowing an array on the stack). I guess the question is twofold: how did you determine that 64K was the largest 'size' value, and how should reviewers verify this as well. Perhaps this should at least be in the commit text so someone tracking down something with this code can find it later. David
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.