Re: [PATCH] string.h: work around for increased stack usage

2017-10-02 Thread Andrey Ryabinin
On 10/02/2017 11:40 AM, Arnd Bergmann wrote: > The hardened strlen() function causes rather large stack usage > in at least one file in the kernel when CONFIG_KASAN is enabled: > > drivers/media/usb/em28xx/em28xx-dvb.c: In function 'em28xx_dvb_init': > drivers/media/usb/em28xx/em28xx-dvb.c:2062:1:

Re: [PATCH v4 4/9] em28xx: fix em28xx_dvb_init for KASAN

2017-09-28 Thread Andrey Ryabinin
On 09/27/2017 04:26 PM, Arnd Bergmann wrote: > On Tue, Sep 26, 2017 at 9:49 AM, Andrey Ryabinin > wrote: >> >> >> On 09/26/2017 09:47 AM, Arnd Bergmann wrote: >>> On Mon, Sep 25, 2017 at 11:32 PM, Arnd Bergmann wrote: > >>> + ret = __builtin_st

Re: [PATCH v4 9/9] kasan: rework Kconfig settings

2017-09-26 Thread Andrey Ryabinin
ow_bug.cgi?id=81715) > and a workaround for older compilers, which means that KASAN_EXTRA is > now just as bad as before and will lead to an instant stack overflow in > a few extreme cases. > > This reverts parts of commit commit 3f181b4 ("lib/Kconfig.debug: disable > -Wframe-larger-than warnings with KASAN=y"). > > Signed-off-by: Arnd Bergmann Acked-by: Andrey Ryabinin

Re: [PATCH v4 4/9] em28xx: fix em28xx_dvb_init for KASAN

2017-09-26 Thread Andrey Ryabinin
On 09/26/2017 09:47 AM, Arnd Bergmann wrote: > On Mon, Sep 25, 2017 at 11:32 PM, Arnd Bergmann wrote: >> On Mon, Sep 25, 2017 at 7:41 AM, David Laight >> wrote: >>> From: Arnd Bergmann Sent: 22 September 2017 22:29 >>> ... It seems that this is triggered in part by using strlcpy(), w

Re: [PATCH 25/26] isdn: eicon: mark divascapi incompatible with kasan

2017-03-03 Thread Andrey Ryabinin
On 03/03/2017 05:54 PM, Arnd Bergmann wrote: > On Fri, Mar 3, 2017 at 3:20 PM, Andrey Ryabinin > wrote: >> >> >> On 03/02/2017 07:38 PM, Arnd Bergmann wrote: >>> When CONFIG_KASAN is enabled, we have several functions that use rather >>> large kernel

Re: [PATCH 26/26] kasan: rework Kconfig settings

2017-03-03 Thread Andrey Ryabinin
On 03/02/2017 07:38 PM, Arnd Bergmann wrote: > > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug > index 97d62c2da6c2..27c838c40a36 100644 > --- a/lib/Kconfig.debug > +++ b/lib/Kconfig.debug > @@ -216,10 +216,9 @@ config ENABLE_MUST_CHECK > config FRAME_WARN > int "Warn for stack fram

Re: [PATCH 25/26] isdn: eicon: mark divascapi incompatible with kasan

2017-03-03 Thread Andrey Ryabinin
On 03/02/2017 07:38 PM, Arnd Bergmann wrote: > When CONFIG_KASAN is enabled, we have several functions that use rather > large kernel stacks, e.g. > > drivers/isdn/hardware/eicon/message.c: In function 'group_optimization': > drivers/isdn/hardware/eicon/message.c:14841:1: warning: the frame size

Re: [PATCH 01/26] compiler: introduce noinline_for_kasan annotation

2017-03-03 Thread Andrey Ryabinin
On 03/02/2017 07:38 PM, Arnd Bergmann wrote: > When CONFIG_KASAN is set, we can run into some code that uses incredible > amounts of kernel stack: > > drivers/staging/dgnc/dgnc_neo.c:1056:1: error: the frame size of 2 bytes > is larger than 2048 bytes [-Werror=frame-larger-than=] > drivers/

Re: [PATCH] Disable -Wframe-larger-than warnings with KASAN=y

2015-10-16 Thread Andrey Ryabinin
16 октября 2015 г. 19:47:00 GMT+03:00, Andi Kleen пишет: >On Fri, Oct 16, 2015 at 07:02:10PM +0300, Andrey Ryabinin wrote: >> When the kernel compiled with KASAN=y, GCC adds redzones >> for each variable on stack. This enlarges function's stack >> frame and causes: &

[PATCH] Disable -Wframe-larger-than warnings with KASAN=y

2015-10-16 Thread Andrey Ryabinin
hus we should turn it off. Reported-by: Fengguang Wu Signed-off-by: Andrey Ryabinin --- lib/Kconfig.debug | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index ab76b99..1d1521c 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -197,6 +197,7 @@ config

Re: [kbuild-all] drivers/media/dvb-frontends/cxd2841er.c:2393:1: warning: the frame size of 2992 bytes is larger than 2048 bytes

2015-10-05 Thread Andrey Ryabinin
2015-10-05 14:09 GMT+03:00 Fengguang Wu : > Hi Abylay, > >> cause of this 'Kernel Address sanitizer (KASan)' is enabled in your >> config. With gcc-4.9 kasan was disabled in compile time because of: >> "scripts/Makefile.kasan:23: CONFIG_KASAN: compiler does not support >> all options. Trying minima