Re: [PATCH] [RESEND v2] structleak: disable STRUCTLEAK_BYREF in combination with KASAN_STACK

2019-07-22 Thread Kees Cook
On Mon, Jul 22, 2019 at 01:41:20PM +0200, Arnd Bergmann wrote: > The combination of KASAN_STACK and GCC_PLUGIN_STRUCTLEAK_BYREF > leads to much larger kernel stack usage, as seen from the warnings > about functions that now exceed the 2048 byte limit: > > drivers/media/i2c/tvp5150.c:253:1: error:

Re: [PATCH] [RESEND v2] structleak: disable STRUCTLEAK_BYREF in combination with KASAN_STACK

2019-07-22 Thread Arnd Bergmann
On Mon, Jul 22, 2019 at 5:23 PM Alexander Potapenko wrote: > On Mon, Jul 22, 2019 at 4:26 PM Arnd Bergmann wrote: > > On Mon, Jul 22, 2019 at 3:43 PM Alexander Potapenko > > wrote: > > > On Mon, Jul 22, 2019 at 1:41 PM Arnd Bergmann wrote: > > Doesn't that just limit the usefulness of KASAN,

Re: [PATCH] [RESEND v2] structleak: disable STRUCTLEAK_BYREF in combination with KASAN_STACK

2019-07-22 Thread Alexander Potapenko
On Mon, Jul 22, 2019 at 4:26 PM Arnd Bergmann wrote: > > On Mon, Jul 22, 2019 at 3:43 PM Alexander Potapenko wrote: > > On Mon, Jul 22, 2019 at 1:41 PM Arnd Bergmann wrote: > > > > > > KASAN_STACK is currently implied by KASAN on gcc, but could be made a > > > user selectable option if we want

Re: [PATCH] [RESEND v2] structleak: disable STRUCTLEAK_BYREF in combination with KASAN_STACK

2019-07-22 Thread Arnd Bergmann
On Mon, Jul 22, 2019 at 3:43 PM Alexander Potapenko wrote: > On Mon, Jul 22, 2019 at 1:41 PM Arnd Bergmann wrote: > > > > KASAN_STACK is currently implied by KASAN on gcc, but could be made a > > user selectable option if we want to allow combining (non-stack) KASAN > > with

Re: [PATCH] [RESEND v2] structleak: disable STRUCTLEAK_BYREF in combination with KASAN_STACK

2019-07-22 Thread Alexander Potapenko
On Mon, Jul 22, 2019 at 1:41 PM Arnd Bergmann wrote: > > The combination of KASAN_STACK and GCC_PLUGIN_STRUCTLEAK_BYREF > leads to much larger kernel stack usage, as seen from the warnings > about functions that now exceed the 2048 byte limit: > > drivers/media/i2c/tvp5150.c:253:1: error: the

[PATCH] [RESEND v2] structleak: disable STRUCTLEAK_BYREF in combination with KASAN_STACK

2019-07-22 Thread Arnd Bergmann
The combination of KASAN_STACK and GCC_PLUGIN_STRUCTLEAK_BYREF leads to much larger kernel stack usage, as seen from the warnings about functions that now exceed the 2048 byte limit: drivers/media/i2c/tvp5150.c:253:1: error: the frame size of 3936 bytes is larger than 2048 bytes