From: kernel test robot <lkp@intel.com>
To: Kees Cook <kees@kernel.org>
Cc: <oe-kbuild-all@lists.linux.dev>,
Nathan Chancellor <nathan@kernel.org>,
Christoph Hellwig <hch@lst.de>
Subject: [kees:for-next/hardening 6/14] mm/kasan/kasan_test_c.c:1504:7: warning: argument to variable-length array may be too large due to conversion from 'int' to 'long unsigned int'
Date: Wed, 7 May 2025 14:08:26 +0800 [thread overview]
Message-ID: <aBr42psLtchaluNU@rli9-mobl> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/hardening
head: 48b79238694db6e7eb3dd6153cf71107db624a11
commit: 1ca6c23046d30abfe57d8706248ad5888aafa3bf [6/14] kbuild: Switch from -Wvla to -Wvla-larger-than=1
:::::: branch date: 33 hours ago
:::::: commit date: 9 days ago
config: arm64-randconfig-002-20250502 (https://download.01.org/0day-ci/archive/20250507/202505071331.4iOzqmuE-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250507/202505071331.4iOzqmuE-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202505071331.4iOzqmuE-lkp@intel.com/
All warnings (new ones prefixed by >>):
mm/kasan/kasan_test_c.c: In function 'kasan_alloca_oob_right':
>> mm/kasan/kasan_test_c.c:1504:7: warning: argument to variable-length array may be too large due to conversion from 'int' to 'long unsigned int' [-Wvla-larger-than=]
char alloca_array[i];
^~~~~~~~~~~~
mm/kasan/kasan_test_c.c: In function 'kasan_alloca_oob_left':
mm/kasan/kasan_test_c.c:1489:7: warning: argument to variable-length array may be too large due to conversion from 'int' to 'long unsigned int' [-Wvla-larger-than=]
char alloca_array[i];
^~~~~~~~~~~~
mm/kasan/kasan_test_c.c: At top level:
cc1: warning: unrecognized command line option '-Wno-vla-larger-than'
vim +1504 mm/kasan/kasan_test_c.c
00a14294bb33af lib/test_kasan.c Paul Lawrence 2018-02-06 1500
73228c7ecc5e40 lib/test_kasan.c Patricia Alfonso 2020-10-13 1501 static void kasan_alloca_oob_right(struct kunit *test)
00a14294bb33af lib/test_kasan.c Paul Lawrence 2018-02-06 1502 {
00a14294bb33af lib/test_kasan.c Paul Lawrence 2018-02-06 1503 volatile int i = 10;
00a14294bb33af lib/test_kasan.c Paul Lawrence 2018-02-06 @1504 char alloca_array[i];
2dfd1bd992322f lib/test_kasan.c Peter Collingbourne 2022-03-24 1505 /* See comment in kasan_global_oob_right. */
f649dc0e0d7b50 lib/test_kasan.c Peter Collingbourne 2021-05-14 1506 char *volatile array = alloca_array;
f649dc0e0d7b50 lib/test_kasan.c Peter Collingbourne 2021-05-14 1507 char *p = array + i;
00a14294bb33af lib/test_kasan.c Paul Lawrence 2018-02-06 1508
58b999d7a22c59 lib/test_kasan.c Andrey Konovalov 2020-11-01 1509 /* Only generic mode instruments dynamic allocas. */
da17e377723f50 lib/test_kasan.c Andrey Konovalov 2021-02-24 1510 KASAN_TEST_NEEDS_CONFIG_ON(test, CONFIG_KASAN_GENERIC);
da17e377723f50 lib/test_kasan.c Andrey Konovalov 2021-02-24 1511 KASAN_TEST_NEEDS_CONFIG_ON(test, CONFIG_KASAN_STACK);
00a14294bb33af lib/test_kasan.c Paul Lawrence 2018-02-06 1512
73228c7ecc5e40 lib/test_kasan.c Patricia Alfonso 2020-10-13 1513 KUNIT_EXPECT_KASAN_FAIL(test, *(volatile char *)p);
73228c7ecc5e40 lib/test_kasan.c Patricia Alfonso 2020-10-13 1514 }
73228c7ecc5e40 lib/test_kasan.c Patricia Alfonso 2020-10-13 1515
:::::: The code at line 1504 was first introduced by commit
:::::: 00a14294bb33af533f7ac002fb20623fdd8ea0d7 kasan: add tests for alloca poisoning
:::::: TO: Paul Lawrence <paullawrence@google.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2025-05-07 6:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-07 6:08 kernel test robot [this message]
2025-05-07 15:48 ` [kees:for-next/hardening 6/14] mm/kasan/kasan_test_c.c:1504:7: warning: argument to variable-length array may be too large due to conversion from 'int' to 'long unsigned int' Kees Cook
-- strict thread matches above, loose matches on Subject: below --
2025-05-07 5:49 kernel test robot
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=aBr42psLtchaluNU@rli9-mobl \
--to=lkp@intel.com \
--cc=hch@lst.de \
--cc=kees@kernel.org \
--cc=nathan@kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.