On Mon, Jan 20, 2014 at 10:01:37AM +0800, Gu Zheng wrote:
> Hi Dan,
> Variable length array(vla) is allowed in ISO C99, and as an extension GCC
> accepts it in C89 mode.
> http://gcc.gnu.org/onlinedocs/gcc-3.4.6/gcc/Variable-Length.html
> On my box, gcc does not give any warning to this, and it works very well.
> So I can not understand why Sparse gave this warning. Or this usage(vla)
> is forbidden in kernel source? If it is true, we must fix it. But, AFAIK,
> there are not these strict provisions.
> 

The kernel has a 2 PAGE_SIZE stack so we need to make sure that
orphan_blocks is very small.  If any individual function uses over 1K
stack then it's considered a bug unless the call tree is carefully
audited.  The stack size limit has security implications so
orphan_blocks has to be something which is easy to audit.

regards,
dan carpenter


_______________________________________________
kbuild mailing list
kbuild@lists.01.org
https://lists.01.org/mailman/listinfo/kbuild

Reply via email to