From: Kees Cook <keescook@chromium.org>
To: Daniel Latypov <dlatypov@google.com>
Cc: kernel test robot <lkp@intel.com>,
kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Vitor Massaru Iha <vitor@massaru.org>,
David Gow <davidgow@google.com>
Subject: Re: lib/overflow_kunit.c:644:1: warning: the frame size of 2832 bytes is larger than 1024 bytes
Date: Wed, 15 Jun 2022 10:45:29 -0700 [thread overview]
Message-ID: <202206151045.36F7623B@keescook> (raw)
In-Reply-To: <CAGS_qxquSGoHD2NeRiS-basVg-nOP8s4kSGi90e2QuMc-Pt0Pg@mail.gmail.com>
On Mon, Jun 13, 2022 at 10:55:02AM -0700, Daniel Latypov wrote:
> On Sat, Jun 11, 2022 at 9:44 AM kernel test robot <lkp@intel.com> wrote:
> >
> > Hi Kees,
> >
> > First bad commit (maybe != root cause):
> >
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > head: 0885eacdc81f920c3e0554d5615e69a66504a28d
> > commit: 617f55e20743fc50c989b498f9dee289eb644cfd lib: overflow: Convert to Kunit
> > date: 3 months ago
> > config: powerpc-buildonly-randconfig-r006-20220611 (https://download.01.org/0day-ci/archive/20220612/202206120046.YKeKzlVN-lkp@intel.com/config)
> > compiler: powerpc-linux-gcc (GCC) 11.3.0
> > reproduce (this is a W=1 build):
> > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> > chmod +x ~/bin/make.cross
> > # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=617f55e20743fc50c989b498f9dee289eb644cfd
> > git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> > git fetch --no-tags linus master
> > git checkout 617f55e20743fc50c989b498f9dee289eb644cfd
> > # save the config file
> > mkdir build_dir && cp config build_dir/.config
> > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash
> >
> > If you fix the issue, kindly add following tag where applicable
> > Reported-by: kernel test robot <lkp@intel.com>
> >
> > All warnings (new ones prefixed by >>):
> >
> > lib/overflow_kunit.c:191:19: warning: 's64_tests' defined but not used [-Wunused-const-variable=]
> > 191 | DEFINE_TEST_ARRAY(s64) = {
> > | ^~~
> > lib/overflow_kunit.c:24:11: note: in definition of macro 'DEFINE_TEST_ARRAY'
> > 24 | } t ## _tests[]
> > | ^
> > lib/overflow_kunit.c:94:19: warning: 'u64_tests' defined but not used [-Wunused-const-variable=]
> > 94 | DEFINE_TEST_ARRAY(u64) = {
> > | ^~~
> > lib/overflow_kunit.c:24:11: note: in definition of macro 'DEFINE_TEST_ARRAY'
> > 24 | } t ## _tests[]
> > | ^
> > lib/overflow_kunit.c: In function 'overflow_size_helpers_test':
> > >> lib/overflow_kunit.c:644:1: warning: the frame size of 2832 bytes is larger than 1024 bytes [-Wframe-larger-than=]
> > 644 | }
> > | ^
> > lib/overflow_kunit.c: In function 'overflow_shift_test':
> > lib/overflow_kunit.c:451:1: warning: the frame size of 7232 bytes is larger than 1024 bytes [-Wframe-larger-than=]
> > 451 | }
> > | ^
>
> I have an RFC series out to reduce the stack usage of KUNIT_EXPECT_*
> even further, but they won't help enough here.
> https://lore.kernel.org/linux-kselftest/20220525154442.1438081-1-dlatypov@google.com/
>
> So If we want to try and "fix" this, I think the only answer would be
> to split up the test funcs as appropriate.
> But I don't really know if that's warranted to fix this warning here,
> which largely indicates a compiler quality problem over a code quality
> one.
I'm happy to review patches, but it does seem more like a compiler
issue. Hmmm.
--
Kees Cook
prev parent reply other threads:[~2022-06-15 17:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-11 16:43 kernel test robot
2022-06-13 17:55 ` Daniel Latypov
2022-06-15 17:45 ` Kees Cook [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202206151045.36F7623B@keescook \
--to=keescook@chromium.org \
--cc=davidgow@google.com \
--cc=dlatypov@google.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=vitor@massaru.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®