[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a21j9yJe_X=kU6v2YgOnrhunRbPv+O6STSH71qTb7xnfg@mail.gmail.com>
Date: Fri, 17 Sep 2021 09:22:08 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Brendan Higgins <brendanhiggins@...gle.com>
Cc: Shuah Khan <shuah@...nel.org>, David Gow <davidgow@...gle.com>,
Arnd Bergmann <arnd@...db.de>,
Kees Cook <keescook@...omium.org>,
Rafael Wysocki <rafael@...nel.org>,
Jonathan Cameron <jic23@...nel.org>,
Lars-Peter Clausen <lars@...afoo.de>,
Ulf Hansson <ulf.hansson@...aro.org>, andreas.noever@...il.com,
michael.jamet@...el.com,
Mika Westerberg <mika.westerberg@...ux.intel.com>,
YehezkelShB@...il.com, Masahiro Yamada <masahiroy@...nel.org>,
Michal Marek <michal.lkml@...kovi.net>,
Nick Desaulniers <ndesaulniers@...gle.com>,
"open list:KERNEL SELFTEST FRAMEWORK"
<linux-kselftest@...r.kernel.org>,
KUnit Development <kunit-dev@...glegroups.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
gregkh <gregkh@...uxfoundation.org>, linux-iio@...r.kernel.org,
linux-mmc <linux-mmc@...r.kernel.org>,
USB list <linux-usb@...r.kernel.org>,
linux-hardening@...r.kernel.org,
Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>
Subject: Re: [PATCH v1 6/6] bitfield: build kunit tests without structleak plugin
On Fri, Sep 17, 2021 at 8:11 AM Brendan Higgins
<brendanhiggins@...gle.com> wrote:
>
> From: Arnd Bergmann <arnd@...db.de>
>
> The structleak plugin causes the stack frame size to grow immensely:
>
> lib/bitfield_kunit.c: In function 'test_bitfields_constants':
> lib/bitfield_kunit.c:93:1: error: the frame size of 7440 bytes is larger than 2048 bytes [-Werror=frame-larger-than=]
>
> Turn it off in this file.
>
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> Signed-off-by: Brendan Higgins <brendanhiggins@...gle.com>
> ---
> lib/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/Makefile b/lib/Makefile
> index 5efd1b435a37c..c93c4b59af969 100644
> --- a/lib/Makefile
> +++ b/lib/Makefile
> @@ -351,7 +351,7 @@ obj-$(CONFIG_OBJAGG) += objagg.o
> obj-$(CONFIG_PLDMFW) += pldmfw/
>
> # KUnit tests
> -CFLAGS_bitfield_kunit.o := $(call cc-option,-Wframe-larger-than=10240)
> +CFLAGS_bitfield_kunit.o := $(call cc-option,-Wframe-larger-than=10240) $(DISABLE_STRUCTLEAK_PLUGIN)
I think the $(call cc-option,-Wframe-larger-than=10240) needs to be dropped
here. This was not in my original patch and it is definitely broken on
all architectures
with 8KB stack size or less if the function needs that much. What is the amount
of actual stack usage you observe without this? If we still get a warning, then
I think this needs to be fixed in the code.
Arnd
Powered by blists - more mailing lists