* drivers/char/random.c:1269:41: warning: shift count >= width of type
@ 2021-01-15 11:39 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-01-15 11:39 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 7946 bytes --]
tree: https://github.com/0day-ci/linux/commits/UPDATE-20210115-150503/sonicadvance1-gmail-com/Adds-a-new-ioctl32-syscall-for-backwards-compatibility-layers/20210106-145354
head: add9d9a623c058dd74282ae99fca6b18fd38e800
commit: add9d9a623c058dd74282ae99fca6b18fd38e800 Adds a new ioctl32 syscall for backwards compatibility layers
date: 5 hours ago
config: mips-randconfig-r001-20210115 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 5b42fd8dd4e7e29125a09a41a33af7c9cb57d144)
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
# install mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://github.com/0day-ci/linux/commit/add9d9a623c058dd74282ae99fca6b18fd38e800
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review UPDATE-20210115-150503/sonicadvance1-gmail-com/Adds-a-new-ioctl32-syscall-for-backwards-compatibility-layers/20210106-145354
git checkout add9d9a623c058dd74282ae99fca6b18fd38e800
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
In file included from drivers/char/random.c:335:
include/linux/syscalls.h:391:5: error: unknown type name 'compat_ulong_t'
compat_ulong_t arg);
^
>> drivers/char/random.c:1269:41: warning: shift count >= width of type [-Wshift-count-overflow]
c_high = (sizeof(cycles) > 4) ? cycles >> 32 : 0;
^ ~~
drivers/char/random.c:2296:6: warning: no previous prototype for function 'add_hwgenerator_randomness' [-Wmissing-prototypes]
void add_hwgenerator_randomness(const char *buffer, size_t count,
^
drivers/char/random.c:2296:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void add_hwgenerator_randomness(const char *buffer, size_t count,
^
static
2 warnings and 1 error generated.
vim +1269 drivers/char/random.c
ee3e00e9e7101c80 Theodore Ts'o 2014-06-15 1254
775f4b297b780601 Theodore Ts'o 2012-07-02 1255 void add_interrupt_randomness(int irq, int irq_flags)
^1da177e4c3f4152 Linus Torvalds 2005-04-16 1256 {
775f4b297b780601 Theodore Ts'o 2012-07-02 1257 struct entropy_store *r;
1b2a1a7e8ad1144d Christoph Lameter 2014-08-17 1258 struct fast_pool *fast_pool = this_cpu_ptr(&irq_randomness);
775f4b297b780601 Theodore Ts'o 2012-07-02 1259 struct pt_regs *regs = get_irq_regs();
775f4b297b780601 Theodore Ts'o 2012-07-02 1260 unsigned long now = jiffies;
655b226470b22955 Theodore Ts'o 2013-09-22 1261 cycles_t cycles = random_get_entropy();
43759d4f429c8d55 Theodore Ts'o 2014-06-14 1262 __u32 c_high, j_high;
655b226470b22955 Theodore Ts'o 2013-09-22 1263 __u64 ip;
83664a6928a420b5 H. Peter Anvin 2014-03-17 1264 unsigned long seed;
91fcb532efe366d7 Theodore Ts'o 2014-06-10 1265 int credit = 0;
655b226470b22955 Theodore Ts'o 2013-09-22 1266
ee3e00e9e7101c80 Theodore Ts'o 2014-06-15 1267 if (cycles == 0)
ee3e00e9e7101c80 Theodore Ts'o 2014-06-15 1268 cycles = get_reg(fast_pool, regs);
655b226470b22955 Theodore Ts'o 2013-09-22 @1269 c_high = (sizeof(cycles) > 4) ? cycles >> 32 : 0;
655b226470b22955 Theodore Ts'o 2013-09-22 1270 j_high = (sizeof(now) > 4) ? now >> 32 : 0;
43759d4f429c8d55 Theodore Ts'o 2014-06-14 1271 fast_pool->pool[0] ^= cycles ^ j_high ^ irq;
43759d4f429c8d55 Theodore Ts'o 2014-06-14 1272 fast_pool->pool[1] ^= now ^ c_high;
655b226470b22955 Theodore Ts'o 2013-09-22 1273 ip = regs ? instruction_pointer(regs) : _RET_IP_;
43759d4f429c8d55 Theodore Ts'o 2014-06-14 1274 fast_pool->pool[2] ^= ip;
ee3e00e9e7101c80 Theodore Ts'o 2014-06-15 1275 fast_pool->pool[3] ^= (sizeof(ip) > 4) ? ip >> 32 :
ee3e00e9e7101c80 Theodore Ts'o 2014-06-15 1276 get_reg(fast_pool, regs);
3060d6fe28570640 Yinghai Lu 2008-08-19 1277
43759d4f429c8d55 Theodore Ts'o 2014-06-14 1278 fast_mix(fast_pool);
43759d4f429c8d55 Theodore Ts'o 2014-06-14 1279 add_interrupt_bench(cycles);
3060d6fe28570640 Yinghai Lu 2008-08-19 1280
43838a23a05fbd13 Theodore Ts'o 2018-04-11 1281 if (unlikely(crng_init == 0)) {
e192be9d9a30555a Theodore Ts'o 2016-06-12 1282 if ((fast_pool->count >= 64) &&
e192be9d9a30555a Theodore Ts'o 2016-06-12 1283 crng_fast_load((char *) fast_pool->pool,
e192be9d9a30555a Theodore Ts'o 2016-06-12 1284 sizeof(fast_pool->pool))) {
e192be9d9a30555a Theodore Ts'o 2016-06-12 1285 fast_pool->count = 0;
e192be9d9a30555a Theodore Ts'o 2016-06-12 1286 fast_pool->last = now;
e192be9d9a30555a Theodore Ts'o 2016-06-12 1287 }
e192be9d9a30555a Theodore Ts'o 2016-06-12 1288 return;
e192be9d9a30555a Theodore Ts'o 2016-06-12 1289 }
e192be9d9a30555a Theodore Ts'o 2016-06-12 1290
840f95077ffd640d Theodore Ts'o 2014-06-14 1291 if ((fast_pool->count < 64) &&
840f95077ffd640d Theodore Ts'o 2014-06-14 1292 !time_after(now, fast_pool->last + HZ))
^1da177e4c3f4152 Linus Torvalds 2005-04-16 1293 return;
^1da177e4c3f4152 Linus Torvalds 2005-04-16 1294
e192be9d9a30555a Theodore Ts'o 2016-06-12 1295 r = &input_pool;
840f95077ffd640d Theodore Ts'o 2014-06-14 1296 if (!spin_trylock(&r->lock))
91fcb532efe366d7 Theodore Ts'o 2014-06-10 1297 return;
83664a6928a420b5 H. Peter Anvin 2014-03-17 1298
91fcb532efe366d7 Theodore Ts'o 2014-06-10 1299 fast_pool->last = now;
85608f8e16c28f81 Theodore Ts'o 2014-06-10 1300 __mix_pool_bytes(r, &fast_pool->pool, sizeof(fast_pool->pool));
83664a6928a420b5 H. Peter Anvin 2014-03-17 1301
83664a6928a420b5 H. Peter Anvin 2014-03-17 1302 /*
83664a6928a420b5 H. Peter Anvin 2014-03-17 1303 * If we have architectural seed generator, produce a seed and
48d6be955a7167b0 Theodore Ts'o 2014-07-17 1304 * add it to the pool. For the sake of paranoia don't let the
48d6be955a7167b0 Theodore Ts'o 2014-07-17 1305 * architectural seed generator dominate the input from the
48d6be955a7167b0 Theodore Ts'o 2014-07-17 1306 * interrupt noise.
83664a6928a420b5 H. Peter Anvin 2014-03-17 1307 */
83664a6928a420b5 H. Peter Anvin 2014-03-17 1308 if (arch_get_random_seed_long(&seed)) {
85608f8e16c28f81 Theodore Ts'o 2014-06-10 1309 __mix_pool_bytes(r, &seed, sizeof(seed));
48d6be955a7167b0 Theodore Ts'o 2014-07-17 1310 credit = 1;
83664a6928a420b5 H. Peter Anvin 2014-03-17 1311 }
91fcb532efe366d7 Theodore Ts'o 2014-06-10 1312 spin_unlock(&r->lock);
83664a6928a420b5 H. Peter Anvin 2014-03-17 1313
ee3e00e9e7101c80 Theodore Ts'o 2014-06-15 1314 fast_pool->count = 0;
83664a6928a420b5 H. Peter Anvin 2014-03-17 1315
ee3e00e9e7101c80 Theodore Ts'o 2014-06-15 1316 /* award one bit for the contents of the fast pool */
ee3e00e9e7101c80 Theodore Ts'o 2014-06-15 1317 credit_entropy_bits(r, credit + 1);
^1da177e4c3f4152 Linus Torvalds 2005-04-16 1318 }
4b44f2d18a330565 Stephan Mueller 2016-05-02 1319 EXPORT_SYMBOL_GPL(add_interrupt_randomness);
^1da177e4c3f4152 Linus Torvalds 2005-04-16 1320
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 28905 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-01-15 11:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-15 11:39 drivers/char/random.c:1269:41: warning: shift count >= width of type kernel test robot
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.