Files
linux/include/net
Arnd Bergmann 15a242fd43 netlink: fix nla_put_{u8,u16,u32} for KASAN
commit b4391db42308c9940944b5d7be5ca4b78fb88dd0 upstream.

When CONFIG_KASAN is enabled, the "--param asan-stack=1" causes rather large
stack frames in some functions. This goes unnoticed normally because
CONFIG_FRAME_WARN is disabled with CONFIG_KASAN by default as of commit
3f181b4d86 ("lib/Kconfig.debug: disable -Wframe-larger-than warnings with
KASAN=y").

The kernelci.org build bot however has the warning enabled and that led
me to investigate it a little further, as every build produces these warnings:

net/wireless/nl80211.c:4389:1: warning: the frame size of 2240 bytes is larger than 2048 bytes [-Wframe-larger-than=]
net/wireless/nl80211.c:1895:1: warning: the frame size of 3776 bytes is larger than 2048 bytes [-Wframe-larger-than=]
net/wireless/nl80211.c:1410:1: warning: the frame size of 2208 bytes is larger than 2048 bytes [-Wframe-larger-than=]
net/bridge/br_netlink.c:1282:1: warning: the frame size of 2544 bytes is larger than 2048 bytes [-Wframe-larger-than=]

Most of this problem is now solved in gcc-8, which can consolidate
the stack slots for the inline function arguments. On older compilers
we can add a workaround by declaring a local variable in each function
to pass the inline function argument.

Cc: stable@vger.kernel.org
Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81715
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
[arnd: rebased to 4.4-stable]
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-25 11:03:51 +01:00
..
2014-09-18 10:54:36 +02:00
2015-06-28 16:55:44 -07:00
2016-04-20 15:42:04 +09:00
2015-03-06 21:50:02 -05:00
2015-09-17 17:18:37 -07:00
2018-02-25 11:03:34 +01:00
2017-06-07 12:05:59 +02:00
2013-11-07 19:28:58 -05:00
2014-09-30 01:02:26 -04:00
2014-01-03 20:56:48 -05:00
2015-10-08 04:27:03 -07:00
2015-10-23 06:26:42 -07:00
2018-02-25 11:03:40 +01:00
2014-06-02 11:00:41 -07:00
2016-11-15 07:46:36 +01:00
2015-03-12 22:58:12 -04:00
2017-11-18 11:11:05 +01:00
2015-10-26 22:24:22 -07:00