[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202205110324.7GrtxG8u-lkp@intel.com>
Date: Wed, 11 May 2022 03:51:26 +0800
From: kernel test robot <lkp@...el.com>
To: Kees Cook <keescook@...omium.org>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
Vitor Massaru Iha <vitor@...saru.org>,
Daniel Latypov <dlatypov@...gle.com>,
David Gow <davidgow@...gle.com>
Subject: lib/overflow_kunit.c:191:19: warning: 's64_tests' defined but not
used
Hi Kees,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 9be9ed2612b5aedb52a2c240edb1630b6b743cb6
commit: 617f55e20743fc50c989b498f9dee289eb644cfd lib: overflow: Convert to Kunit
date: 2 months ago
config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20220511/202205110324.7GrtxG8u-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.2.0-20) 11.2.0
reproduce (this is a W=1 build):
# 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
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.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 2480 bytes is larger than 2048 bytes [-Wframe-larger-than=]
644 | }
| ^
vim +/s64_tests +191 lib/overflow_kunit.c
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 93
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 @94 DEFINE_TEST_ARRAY(u64) = {
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 95 {0, 0, 0, 0, 0, false, false, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 96 {1, 1, 2, 0, 1, false, false, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 97 {0, 1, 1, U64_MAX, 0, false, true, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 98 {1, 0, 1, 1, 0, false, false, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 99 {0, U64_MAX, U64_MAX, 1, 0, false, true, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 100 {U64_MAX, 0, U64_MAX, U64_MAX, 0, false, false, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 101 {1, U64_MAX, 0, 2, U64_MAX, true, true, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 102 {U64_MAX, 1, 0, U64_MAX-1, U64_MAX, true, false, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 103 {U64_MAX, U64_MAX, U64_MAX-1, 0, 1, true, false, true},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 104
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 105 {U64_MAX, U64_MAX-1, U64_MAX-2, 1, 2, true, false, true},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 106 {U64_MAX-1, U64_MAX, U64_MAX-2, U64_MAX, 2, true, true, true},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 107
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 108 {1ULL << 31, 1ULL << 31, 1ULL << 32, 0, 1ULL << 62, false, false, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 109 {1ULL << 32, 1ULL << 32, 1ULL << 33, 0, 0, false, false, true},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 110 {1ULL << 32, 1ULL << 31, 3*(1ULL << 31), 1ULL << 31, 1ULL << 63, false, false, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 111 {1ULL << 63, 1ULL << 63, 0, 0, 0, true, false, true},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 112 {1000000000ULL /* 10^9 */, 10000000000ULL /* 10^10 */,
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 113 11000000000ULL, 18446744064709551616ULL, 10000000000000000000ULL,
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 114 false, true, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 115 {-15ULL, 10ULL, -5ULL, -25ULL, -150ULL, false, false, true},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 116 };
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 117
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 118 DEFINE_TEST_ARRAY(s8) = {
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 119 {0, 0, 0, 0, 0, false, false, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 120
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 121 {0, S8_MAX, S8_MAX, -S8_MAX, 0, false, false, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 122 {S8_MAX, 0, S8_MAX, S8_MAX, 0, false, false, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 123 {0, S8_MIN, S8_MIN, S8_MIN, 0, false, true, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 124 {S8_MIN, 0, S8_MIN, S8_MIN, 0, false, false, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 125
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 126 {-1, S8_MIN, S8_MAX, S8_MAX, S8_MIN, true, false, true},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 127 {S8_MIN, -1, S8_MAX, -S8_MAX, S8_MIN, true, false, true},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 128 {-1, S8_MAX, S8_MAX-1, S8_MIN, -S8_MAX, false, false, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 129 {S8_MAX, -1, S8_MAX-1, S8_MIN, -S8_MAX, false, true, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 130 {-1, -S8_MAX, S8_MIN, S8_MAX-1, S8_MAX, false, false, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 131 {-S8_MAX, -1, S8_MIN, S8_MIN+2, S8_MAX, false, false, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 132
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 133 {1, S8_MIN, -S8_MAX, -S8_MAX, S8_MIN, false, true, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 134 {S8_MIN, 1, -S8_MAX, S8_MAX, S8_MIN, false, true, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 135 {1, S8_MAX, S8_MIN, S8_MIN+2, S8_MAX, true, false, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 136 {S8_MAX, 1, S8_MIN, S8_MAX-1, S8_MAX, true, false, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 137
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 138 {S8_MIN, S8_MIN, 0, 0, 0, true, false, true},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 139 {S8_MAX, S8_MAX, -2, 0, 1, true, false, true},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 140
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 141 {-4, -32, -36, 28, -128, false, false, true},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 142 {-4, 32, 28, -36, -128, false, false, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 143 };
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 144
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 145 DEFINE_TEST_ARRAY(s16) = {
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 146 {0, 0, 0, 0, 0, false, false, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 147
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 148 {0, S16_MAX, S16_MAX, -S16_MAX, 0, false, false, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 149 {S16_MAX, 0, S16_MAX, S16_MAX, 0, false, false, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 150 {0, S16_MIN, S16_MIN, S16_MIN, 0, false, true, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 151 {S16_MIN, 0, S16_MIN, S16_MIN, 0, false, false, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 152
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 153 {-1, S16_MIN, S16_MAX, S16_MAX, S16_MIN, true, false, true},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 154 {S16_MIN, -1, S16_MAX, -S16_MAX, S16_MIN, true, false, true},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 155 {-1, S16_MAX, S16_MAX-1, S16_MIN, -S16_MAX, false, false, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 156 {S16_MAX, -1, S16_MAX-1, S16_MIN, -S16_MAX, false, true, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 157 {-1, -S16_MAX, S16_MIN, S16_MAX-1, S16_MAX, false, false, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 158 {-S16_MAX, -1, S16_MIN, S16_MIN+2, S16_MAX, false, false, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 159
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 160 {1, S16_MIN, -S16_MAX, -S16_MAX, S16_MIN, false, true, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 161 {S16_MIN, 1, -S16_MAX, S16_MAX, S16_MIN, false, true, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 162 {1, S16_MAX, S16_MIN, S16_MIN+2, S16_MAX, true, false, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 163 {S16_MAX, 1, S16_MIN, S16_MAX-1, S16_MAX, true, false, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 164
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 165 {S16_MIN, S16_MIN, 0, 0, 0, true, false, true},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 166 {S16_MAX, S16_MAX, -2, 0, 1, true, false, true},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 167 };
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 168 DEFINE_TEST_ARRAY(s32) = {
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 169 {0, 0, 0, 0, 0, false, false, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 170
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 171 {0, S32_MAX, S32_MAX, -S32_MAX, 0, false, false, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 172 {S32_MAX, 0, S32_MAX, S32_MAX, 0, false, false, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 173 {0, S32_MIN, S32_MIN, S32_MIN, 0, false, true, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 174 {S32_MIN, 0, S32_MIN, S32_MIN, 0, false, false, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 175
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 176 {-1, S32_MIN, S32_MAX, S32_MAX, S32_MIN, true, false, true},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 177 {S32_MIN, -1, S32_MAX, -S32_MAX, S32_MIN, true, false, true},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 178 {-1, S32_MAX, S32_MAX-1, S32_MIN, -S32_MAX, false, false, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 179 {S32_MAX, -1, S32_MAX-1, S32_MIN, -S32_MAX, false, true, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 180 {-1, -S32_MAX, S32_MIN, S32_MAX-1, S32_MAX, false, false, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 181 {-S32_MAX, -1, S32_MIN, S32_MIN+2, S32_MAX, false, false, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 182
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 183 {1, S32_MIN, -S32_MAX, -S32_MAX, S32_MIN, false, true, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 184 {S32_MIN, 1, -S32_MAX, S32_MAX, S32_MIN, false, true, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 185 {1, S32_MAX, S32_MIN, S32_MIN+2, S32_MAX, true, false, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 186 {S32_MAX, 1, S32_MIN, S32_MAX-1, S32_MAX, true, false, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 187
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 188 {S32_MIN, S32_MIN, 0, 0, 0, true, false, true},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 189 {S32_MAX, S32_MAX, -2, 0, 1, true, false, true},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 190 };
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 @191 DEFINE_TEST_ARRAY(s64) = {
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 192 {0, 0, 0, 0, 0, false, false, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 193
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 194 {0, S64_MAX, S64_MAX, -S64_MAX, 0, false, false, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 195 {S64_MAX, 0, S64_MAX, S64_MAX, 0, false, false, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 196 {0, S64_MIN, S64_MIN, S64_MIN, 0, false, true, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 197 {S64_MIN, 0, S64_MIN, S64_MIN, 0, false, false, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 198
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 199 {-1, S64_MIN, S64_MAX, S64_MAX, S64_MIN, true, false, true},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 200 {S64_MIN, -1, S64_MAX, -S64_MAX, S64_MIN, true, false, true},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 201 {-1, S64_MAX, S64_MAX-1, S64_MIN, -S64_MAX, false, false, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 202 {S64_MAX, -1, S64_MAX-1, S64_MIN, -S64_MAX, false, true, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 203 {-1, -S64_MAX, S64_MIN, S64_MAX-1, S64_MAX, false, false, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 204 {-S64_MAX, -1, S64_MIN, S64_MIN+2, S64_MAX, false, false, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 205
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 206 {1, S64_MIN, -S64_MAX, -S64_MAX, S64_MIN, false, true, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 207 {S64_MIN, 1, -S64_MAX, S64_MAX, S64_MIN, false, true, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 208 {1, S64_MAX, S64_MIN, S64_MIN+2, S64_MAX, true, false, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 209 {S64_MAX, 1, S64_MIN, S64_MAX-1, S64_MAX, true, false, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 210
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 211 {S64_MIN, S64_MIN, 0, 0, 0, true, false, true},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 212 {S64_MAX, S64_MAX, -2, 0, 1, true, false, true},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 213
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 214 {-1, -1, -2, 0, 1, false, false, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 215 {-1, -128, -129, 127, 128, false, false, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 216 {-128, -1, -129, -127, 128, false, false, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 217 {0, -S64_MAX, -S64_MAX, S64_MAX, 0, false, false, false},
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 218 };
455a35a6cdb6f5 lib/test_overflow.c Rasmus Villemoes 2018-05-08 219
:::::: The code at line 191 was first introduced by commit
:::::: 455a35a6cdb6f53fe9294e23301eb056f2908bd9 lib: add runtime test of check_*_overflow functions
:::::: TO: Rasmus Villemoes <linux@...musvillemoes.dk>
:::::: CC: Kees Cook <keescook@...omium.org>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
Powered by blists - more mailing lists