]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
caif: reduce stack size with KASAN
authorArnd Bergmann <arnd@arndb.de>
Tue, 16 Jan 2018 16:34:00 +0000 (17:34 +0100)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commitdfadd64a64696e0d8fc484eeec79c5e4a1d7356d
tree6ad123f71c2242b28718ad880dda81127bd52df6
parent9363fdd217e87c298beb5303392e17e41b3a7cc4
caif: reduce stack size with KASAN

BugLink: https://bugs.launchpad.net/bugs/1838459
commit ce6289661b14a8b391d90db918c91b6d6da6540a upstream.

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@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
include/net/caif/cfpkt.h
net/caif/cfctrl.c