Re: clang, stack limit and inlining

2016-10-02 Thread Mark Kettenis
> From: "Theo de Raadt" > Date: Fri, 30 Sep 2016 09:38:30 -0600 > > > Diff below is a possible way to fix this. But in a way we're cheating > > here since we'll still consume more than 2047 bytes of stack space > > when we descend into wskbd_initmute(). So perhaps we

Re: clang, stack limit and inlining

2016-09-30 Thread Theo de Raadt
> Diff below is a possible way to fix this. But in a way we're cheating > here since we'll still consume more than 2047 bytes of stack space > when we descend into wskbd_initmute(). So perhaps we should rewrite > this code to dynamically allocate the mixer_devinfo structs? yes, it should be

clang, stack limit and inlining

2016-09-30 Thread Mark Kettenis
We compile out kernel with -Wframe-larger-than=2047 to make sure we don't write stupid code that blows the kernel stack. Now clang thinks it is clever and considers it a good idea to inline functions when the function and the caller live in the same source file. A particular case where this