[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a1OsiUV5YuwzSJ4CsD8NHJHjedTA4K7xBKK6Q-4kA8t5g@mail.gmail.com>
Date: Tue, 7 Jan 2020 13:37:07 +0100
From: Arnd Bergmann <arnd@...db.de>
To: PMWG CI <pmwg-ci@...aro.org>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Cc: Private Kernel Alias <private-kwg@...aro.org>,
Kees Cook <keescook@...omium.org>,
Brendan Higgins <brendanhiggins@...gle.com>,
Ard Biesheuvel <ardb@...nel.org>
Subject: kunit stack usage, was: pmwg-ci report v5.5-rc4-147-gc62d43442481
On Mon, Dec 30, 2019 at 6:16 PM PMWG CI <pmwg-ci@...aro.org> wrote:
>
>
> The error/warning: 1 drivers/base/test/property-entry-test.c:214:1: warning: the frame size of 3128 bytes is larger than 2048 bytes [-Wframe-larger-than=]
> ... was introduced by commit:
>
> commit c032ace71c29d513bf9df64ace1885fe5ff24981
> Author: Dmitry Torokhov <dmitry.torokhov@...il.com>
> Date: Wed Dec 4 10:53:15 2019 -0800
>
> software node: add basic tests for property entries
This problem is a result of the KUNIT_ASSERTION() definition that puts
a local struct on the stack interacting badly with the structleak_plugin
when CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL is set in
allmodconfig:
pe_test_uint_arrays() contains a couple of larger variables, plus 41
instances of KUNIT_EXPECT_*() or KUNIT_ASSERT_*(), each one
of these adds its own copy of the structure, eventually exceeding
the warning limit.
We can work around this locally by splitting up the largest four
functions in this file (pe_test_uints, pe_test_uint_arrays, pe_test_strings,
and pe_test_reference) into smaller functions that stay below the
warning limit, but it would be nice to find a way for kunit to not
use as much stack space. Any suggestions?
Arnd
Powered by blists - more mailing lists