Re: [PATCH] caif: reduce stack size with KASAN
From: David Miller
Date: Fri Jan 19 2018 - 14:02:58 EST
From: Arnd Bergmann <arnd@xxxxxxxx>
Date: Tue, 16 Jan 2018 17:34:00 +0100
> When CONFIG_KASAN is set, we can use relatively large amounts of kernel
> stack space:
>
> net/caif/cfctrl.c:555:1: warning: the frame size of 1600 bytes is larger than 1280 bytes [-Wframe-larger-than=]
>
> This adds convenience wrappers around cfpkt_extr_head(), which is responsible
> for most of the stack growth. With those wrapper functions, gcc apparently
> starts reusing the stack slots for each instance, thus avoiding the
> problem.
>
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
> ---
> I sent this in December, but apparently got the wrong Cc list.
> It also seems that Dmitry Tarnyagin's email address as listed
> in the MAINTAINERS file is invalid.
>
> Resending now.
Applied to net-next, thanks Arnd.