[kees:kspp/array-bounds/next-20210816/v1 9/10] include/linux/fortify-string.h:20:33: warning: '__builtin_memcpy' offset [0, 511] is out of the bounds [0, 0]
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git kspp/array-bounds/next-20210816/v1
head: b07d5e8190ca172b1ffddd1412b921296000b379
commit: ecc23a9ee765008e439113eea38fb1cbbd3d7c83 [9/10] Makefile: Enable -Warray-bounds
config: s390-randconfig-r001-20210816 (attached as .config)
compiler: s390-linux-gcc (GCC) 11.2.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/kees/linux.git/commit/?id...
git remote add kees https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git
git fetch --no-tags kees kspp/array-bounds/next-20210816/v1
git checkout ecc23a9ee765008e439113eea38fb1cbbd3d7c83
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=s390
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/string.h:262,
from include/linux/bitmap.h:10,
from include/linux/cpumask.h:12,
from include/linux/smp.h:13,
from include/linux/lockdep.h:14,
from include/linux/rcupdate.h:29,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/ratelimit.h:6,
from include/linux/dev_printk.h:16,
from include/linux/device.h:15,
from arch/s390/kernel/machine_kexec.c:10:
In function 'memcpy',
inlined from '__do_machine_kdump' at arch/s390/kernel/machine_kexec.c:58:2:
>> include/linux/fortify-string.h:20:33: warning: '__builtin_memcpy' offset [0, 511] is out of the bounds [0, 0] [-Warray-bounds]
20 | #define __underlying_memcpy __builtin_memcpy
| ^
include/linux/fortify-string.h:191:16: note: in expansion of macro '__underlying_memcpy'
191 | return __underlying_memcpy(p, q, size);
| ^~~~~~~~~~~~~~~~~~~
vim +/__builtin_memcpy +20 include/linux/fortify-string.h
a28a6e860c6cf2 Francis Laniel 2021-02-25 4
a28a6e860c6cf2 Francis Laniel 2021-02-25 5
a28a6e860c6cf2 Francis Laniel 2021-02-25 6 #if defined(CONFIG_KASAN_GENERIC) || defined(CONFIG_KASAN_SW_TAGS)
a28a6e860c6cf2 Francis Laniel 2021-02-25 7 extern void *__underlying_memchr(const void *p, int c, __kernel_size_t size) __RENAME(memchr);
a28a6e860c6cf2 Francis Laniel 2021-02-25 8 extern int __underlying_memcmp(const void *p, const void *q, __kernel_size_t size) __RENAME(memcmp);
a28a6e860c6cf2 Francis Laniel 2021-02-25 9 extern void *__underlying_memcpy(void *p, const void *q, __kernel_size_t size) __RENAME(memcpy);
a28a6e860c6cf2 Francis Laniel 2021-02-25 10 extern void *__underlying_memmove(void *p, const void *q, __kernel_size_t size) __RENAME(memmove);
a28a6e860c6cf2 Francis Laniel 2021-02-25 11 extern void *__underlying_memset(void *p, int c, __kernel_size_t size) __RENAME(memset);
a28a6e860c6cf2 Francis Laniel 2021-02-25 12 extern char *__underlying_strcat(char *p, const char *q) __RENAME(strcat);
a28a6e860c6cf2 Francis Laniel 2021-02-25 13 extern char *__underlying_strcpy(char *p, const char *q) __RENAME(strcpy);
a28a6e860c6cf2 Francis Laniel 2021-02-25 14 extern __kernel_size_t __underlying_strlen(const char *p) __RENAME(strlen);
a28a6e860c6cf2 Francis Laniel 2021-02-25 15 extern char *__underlying_strncat(char *p, const char *q, __kernel_size_t count) __RENAME(strncat);
a28a6e860c6cf2 Francis Laniel 2021-02-25 16 extern char *__underlying_strncpy(char *p, const char *q, __kernel_size_t size) __RENAME(strncpy);
a28a6e860c6cf2 Francis Laniel 2021-02-25 17 #else
a28a6e860c6cf2 Francis Laniel 2021-02-25 18 #define __underlying_memchr __builtin_memchr
a28a6e860c6cf2 Francis Laniel 2021-02-25 19 #define __underlying_memcmp __builtin_memcmp
a28a6e860c6cf2 Francis Laniel 2021-02-25 @20 #define __underlying_memcpy __builtin_memcpy
a28a6e860c6cf2 Francis Laniel 2021-02-25 21 #define __underlying_memmove __builtin_memmove
a28a6e860c6cf2 Francis Laniel 2021-02-25 22 #define __underlying_memset __builtin_memset
a28a6e860c6cf2 Francis Laniel 2021-02-25 23 #define __underlying_strcat __builtin_strcat
a28a6e860c6cf2 Francis Laniel 2021-02-25 24 #define __underlying_strcpy __builtin_strcpy
a28a6e860c6cf2 Francis Laniel 2021-02-25 25 #define __underlying_strlen __builtin_strlen
a28a6e860c6cf2 Francis Laniel 2021-02-25 26 #define __underlying_strncat __builtin_strncat
a28a6e860c6cf2 Francis Laniel 2021-02-25 27 #define __underlying_strncpy __builtin_strncpy
a28a6e860c6cf2 Francis Laniel 2021-02-25 28 #endif
a28a6e860c6cf2 Francis Laniel 2021-02-25 29
:::::: The code at line 20 was first introduced by commit
:::::: a28a6e860c6cf231cf3c5171c75c342adcd00406 string.h: move fortified functions definitions in a dedicated header.
:::::: TO: Francis Laniel <laniel_francis(a)privacyrequired.com>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
Re: [PATCH V2] raid1: ensure write behind bio has less than BIO_MAX_VECS sectors
by kernel test robot
Hi Guoqing,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on song-md/md-next]
[also build test ERROR on v5.14-rc6 next-20210818]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Guoqing-Jiang/raid1-ensure-write...
base: git://git.kernel.org/pub/scm/linux/kernel/git/song/md.git md-next
config: arc-randconfig-r043-20210816 (attached as .config)
compiler: arc-elf-gcc (GCC) 11.2.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://github.com/0day-ci/linux/commit/abf22557456363eb6fd1d1d09332f5261...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Guoqing-Jiang/raid1-ensure-write-behind-bio-has-less-than-BIO_MAX_VECS-sectors/20210818-154106
git checkout abf22557456363eb6fd1d1d09332f5261d61796c
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arc SHELL=/bin/bash drivers/md/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/md/raid1.c: In function 'raid1_write_request':
>> drivers/md/raid1.c:1388:44: error: 'mirror' undeclared (first use in this function); did you mean 'md_error'?
1388 | if (test_bit(WriteMostly, &mirror->rdev->flags))
| ^~~~~~
| md_error
drivers/md/raid1.c:1388:44: note: each undeclared identifier is reported only once for each function it appears in
In file included from include/linux/kernel.h:16,
from include/linux/list.h:9,
from include/linux/preempt.h:11,
from include/linux/spinlock.h:51,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:6,
from include/linux/slab.h:15,
from drivers/md/raid1.c:26:
drivers/md/raid1.c:1471:70: error: 'PAGE_SECTORS' undeclared (first use in this function)
1471 | max_sectors = min_t(int, max_sectors, BIO_MAX_VECS * PAGE_SECTORS);
| ^~~~~~~~~~~~
include/linux/minmax.h:20:46: note: in definition of macro '__typecheck'
20 | (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
| ^
include/linux/minmax.h:36:31: note: in expansion of macro '__safe_cmp'
36 | __builtin_choose_expr(__safe_cmp(x, y), \
| ^~~~~~~~~~
include/linux/minmax.h:104:33: note: in expansion of macro '__careful_cmp'
104 | #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <)
| ^~~~~~~~~~~~~
drivers/md/raid1.c:1471:31: note: in expansion of macro 'min_t'
1471 | max_sectors = min_t(int, max_sectors, BIO_MAX_VECS * PAGE_SECTORS);
| ^~~~~
include/linux/minmax.h:36:9: error: first argument to '__builtin_choose_expr' not a constant
36 | __builtin_choose_expr(__safe_cmp(x, y), \
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:104:33: note: in expansion of macro '__careful_cmp'
104 | #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <)
| ^~~~~~~~~~~~~
drivers/md/raid1.c:1471:31: note: in expansion of macro 'min_t'
1471 | max_sectors = min_t(int, max_sectors, BIO_MAX_VECS * PAGE_SECTORS);
| ^~~~~
vim +1388 drivers/md/raid1.c
1320
1321 static void raid1_write_request(struct mddev *mddev, struct bio *bio,
1322 int max_write_sectors)
1323 {
1324 struct r1conf *conf = mddev->private;
1325 struct r1bio *r1_bio;
1326 int i, disks;
1327 struct bitmap *bitmap = mddev->bitmap;
1328 unsigned long flags;
1329 struct md_rdev *blocked_rdev;
1330 struct blk_plug_cb *cb;
1331 struct raid1_plug_cb *plug = NULL;
1332 int first_clone;
1333 int max_sectors;
1334 bool write_behind = false;
1335
1336 if (mddev_is_clustered(mddev) &&
1337 md_cluster_ops->area_resyncing(mddev, WRITE,
1338 bio->bi_iter.bi_sector, bio_end_sector(bio))) {
1339
1340 DEFINE_WAIT(w);
1341 for (;;) {
1342 prepare_to_wait(&conf->wait_barrier,
1343 &w, TASK_IDLE);
1344 if (!md_cluster_ops->area_resyncing(mddev, WRITE,
1345 bio->bi_iter.bi_sector,
1346 bio_end_sector(bio)))
1347 break;
1348 schedule();
1349 }
1350 finish_wait(&conf->wait_barrier, &w);
1351 }
1352
1353 /*
1354 * Register the new request and wait if the reconstruction
1355 * thread has put up a bar for new requests.
1356 * Continue immediately if no resync is active currently.
1357 */
1358 wait_barrier(conf, bio->bi_iter.bi_sector);
1359
1360 r1_bio = alloc_r1bio(mddev, bio);
1361 r1_bio->sectors = max_write_sectors;
1362
1363 if (conf->pending_count >= max_queued_requests) {
1364 md_wakeup_thread(mddev->thread);
1365 raid1_log(mddev, "wait queued");
1366 wait_event(conf->wait_barrier,
1367 conf->pending_count < max_queued_requests);
1368 }
1369 /* first select target devices under rcu_lock and
1370 * inc refcount on their rdev. Record them by setting
1371 * bios[x] to bio
1372 * If there are known/acknowledged bad blocks on any device on
1373 * which we have seen a write error, we want to avoid writing those
1374 * blocks.
1375 * This potentially requires several writes to write around
1376 * the bad blocks. Each set of writes gets it's own r1bio
1377 * with a set of bios attached.
1378 */
1379
1380 disks = conf->raid_disks * 2;
1381 retry_write:
1382 blocked_rdev = NULL;
1383 rcu_read_lock();
1384 max_sectors = r1_bio->sectors;
1385 for (i = 0; i < disks; i++) {
1386 struct md_rdev *rdev = rcu_dereference(conf->mirrors[i].rdev);
1387
> 1388 if (test_bit(WriteMostly, &mirror->rdev->flags))
1389 write_behind = true;
1390
1391 if (rdev && unlikely(test_bit(Blocked, &rdev->flags))) {
1392 atomic_inc(&rdev->nr_pending);
1393 blocked_rdev = rdev;
1394 break;
1395 }
1396 r1_bio->bios[i] = NULL;
1397 if (!rdev || test_bit(Faulty, &rdev->flags)) {
1398 if (i < conf->raid_disks)
1399 set_bit(R1BIO_Degraded, &r1_bio->state);
1400 continue;
1401 }
1402
1403 atomic_inc(&rdev->nr_pending);
1404 if (test_bit(WriteErrorSeen, &rdev->flags)) {
1405 sector_t first_bad;
1406 int bad_sectors;
1407 int is_bad;
1408
1409 is_bad = is_badblock(rdev, r1_bio->sector, max_sectors,
1410 &first_bad, &bad_sectors);
1411 if (is_bad < 0) {
1412 /* mustn't write here until the bad block is
1413 * acknowledged*/
1414 set_bit(BlockedBadBlocks, &rdev->flags);
1415 blocked_rdev = rdev;
1416 break;
1417 }
1418 if (is_bad && first_bad <= r1_bio->sector) {
1419 /* Cannot write here at all */
1420 bad_sectors -= (r1_bio->sector - first_bad);
1421 if (bad_sectors < max_sectors)
1422 /* mustn't write more than bad_sectors
1423 * to other devices yet
1424 */
1425 max_sectors = bad_sectors;
1426 rdev_dec_pending(rdev, mddev);
1427 /* We don't set R1BIO_Degraded as that
1428 * only applies if the disk is
1429 * missing, so it might be re-added,
1430 * and we want to know to recover this
1431 * chunk.
1432 * In this case the device is here,
1433 * and the fact that this chunk is not
1434 * in-sync is recorded in the bad
1435 * block log
1436 */
1437 continue;
1438 }
1439 if (is_bad) {
1440 int good_sectors = first_bad - r1_bio->sector;
1441 if (good_sectors < max_sectors)
1442 max_sectors = good_sectors;
1443 }
1444 }
1445 r1_bio->bios[i] = bio;
1446 }
1447 rcu_read_unlock();
1448
1449 if (unlikely(blocked_rdev)) {
1450 /* Wait for this device to become unblocked */
1451 int j;
1452
1453 for (j = 0; j < i; j++)
1454 if (r1_bio->bios[j])
1455 rdev_dec_pending(conf->mirrors[j].rdev, mddev);
1456 r1_bio->state = 0;
1457 allow_barrier(conf, bio->bi_iter.bi_sector);
1458 raid1_log(mddev, "wait rdev %d blocked", blocked_rdev->raid_disk);
1459 md_wait_for_blocked_rdev(blocked_rdev, mddev);
1460 wait_barrier(conf, bio->bi_iter.bi_sector);
1461 goto retry_write;
1462 }
1463
1464 /*
1465 * When using a bitmap, we may call alloc_behind_master_bio below.
1466 * alloc_behind_master_bio allocates a copy of the data payload a page
1467 * at a time and thus needs a new bio that can fit the whole payload
1468 * this bio in page sized chunks.
1469 */
1470 if (write_behind && bitmap)
1471 max_sectors = min_t(int, max_sectors, BIO_MAX_VECS * PAGE_SECTORS);
1472 if (max_sectors < bio_sectors(bio)) {
1473 struct bio *split = bio_split(bio, max_sectors,
1474 GFP_NOIO, &conf->bio_split);
1475 bio_chain(split, bio);
1476 submit_bio_noacct(bio);
1477 bio = split;
1478 r1_bio->master_bio = bio;
1479 r1_bio->sectors = max_sectors;
1480 }
1481
1482 if (blk_queue_io_stat(bio->bi_bdev->bd_disk->queue))
1483 r1_bio->start_time = bio_start_io_acct(bio);
1484 atomic_set(&r1_bio->remaining, 1);
1485 atomic_set(&r1_bio->behind_remaining, 0);
1486
1487 first_clone = 1;
1488
1489 for (i = 0; i < disks; i++) {
1490 struct bio *mbio = NULL;
1491 struct md_rdev *rdev = conf->mirrors[i].rdev;
1492 if (!r1_bio->bios[i])
1493 continue;
1494
1495 if (first_clone) {
1496 /* do behind I/O ?
1497 * Not if there are too many, or cannot
1498 * allocate memory, or a reader on WriteMostly
1499 * is waiting for behind writes to flush */
1500 if (bitmap &&
1501 (atomic_read(&bitmap->behind_writes)
1502 < mddev->bitmap_info.max_write_behind) &&
1503 !waitqueue_active(&bitmap->behind_wait)) {
1504 alloc_behind_master_bio(r1_bio, bio);
1505 }
1506
1507 md_bitmap_startwrite(bitmap, r1_bio->sector, r1_bio->sectors,
1508 test_bit(R1BIO_BehindIO, &r1_bio->state));
1509 first_clone = 0;
1510 }
1511
1512 if (r1_bio->behind_master_bio)
1513 mbio = bio_clone_fast(r1_bio->behind_master_bio,
1514 GFP_NOIO, &mddev->bio_set);
1515 else
1516 mbio = bio_clone_fast(bio, GFP_NOIO, &mddev->bio_set);
1517
1518 if (r1_bio->behind_master_bio) {
1519 if (test_bit(CollisionCheck, &rdev->flags))
1520 wait_for_serialization(rdev, r1_bio);
1521 if (test_bit(WriteMostly, &rdev->flags))
1522 atomic_inc(&r1_bio->behind_remaining);
1523 } else if (mddev->serialize_policy)
1524 wait_for_serialization(rdev, r1_bio);
1525
1526 r1_bio->bios[i] = mbio;
1527
1528 mbio->bi_iter.bi_sector = (r1_bio->sector +
1529 conf->mirrors[i].rdev->data_offset);
1530 bio_set_dev(mbio, conf->mirrors[i].rdev->bdev);
1531 mbio->bi_end_io = raid1_end_write_request;
1532 mbio->bi_opf = bio_op(bio) | (bio->bi_opf & (REQ_SYNC | REQ_FUA));
1533 if (test_bit(FailFast, &conf->mirrors[i].rdev->flags) &&
1534 !test_bit(WriteMostly, &conf->mirrors[i].rdev->flags) &&
1535 conf->raid_disks - mddev->degraded > 1)
1536 mbio->bi_opf |= MD_FAILFAST;
1537 mbio->bi_private = r1_bio;
1538
1539 atomic_inc(&r1_bio->remaining);
1540
1541 if (mddev->gendisk)
1542 trace_block_bio_remap(mbio, disk_devt(mddev->gendisk),
1543 r1_bio->sector);
1544 /* flush_pending_writes() needs access to the rdev so...*/
1545 mbio->bi_bdev = (void *)conf->mirrors[i].rdev;
1546
1547 cb = blk_check_plugged(raid1_unplug, mddev, sizeof(*plug));
1548 if (cb)
1549 plug = container_of(cb, struct raid1_plug_cb, cb);
1550 else
1551 plug = NULL;
1552 if (plug) {
1553 bio_list_add(&plug->pending, mbio);
1554 plug->pending_cnt++;
1555 } else {
1556 spin_lock_irqsave(&conf->device_lock, flags);
1557 bio_list_add(&conf->pending_bio_list, mbio);
1558 conf->pending_count++;
1559 spin_unlock_irqrestore(&conf->device_lock, flags);
1560 md_wakeup_thread(mddev->thread);
1561 }
1562 }
1563
1564 r1_bio_write_done(r1_bio);
1565
1566 /* In case raid1d snuck in to freeze_array */
1567 wake_up(&conf->wait_barrier);
1568 }
1569
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
Re: [PATCH v8 2/3] tty: hvc: pass DMA capable memory to put_chars()
by kernel test robot
Hi Xianting,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on tty/tty-testing]
[also build test WARNING on char-misc/char-misc-testing soc/for-next v5.14-rc6 next-20210818]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Xianting-Tian/make-hvc-pass-dma-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-testing
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gcc (GCC) 11.2.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://github.com/0day-ci/linux/commit/e1b7662dafceb07a6905b64da2f1be274...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Xianting-Tian/make-hvc-pass-dma-capable-memory-to-its-backend/20210818-162408
git checkout e1b7662dafceb07a6905b64da2f1be27498c4a46
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=sh
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/tty/hvc/hvc_console.c: In function 'hvc_poll_put_char':
>> drivers/tty/hvc/hvc_console.c:880:55: warning: passing argument 2 of 'hp->ops->put_chars' makes pointer from integer without a cast [-Wint-conversion]
880 | n = hp->ops->put_chars(hp->vtermno, hp->out_ch, 1);
| ~~^~~~~~~~
| |
| char
drivers/tty/hvc/hvc_console.c:880:55: note: expected 'const char *' but argument is of type 'char'
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for SND_ATMEL_SOC_PDC
Depends on SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC && HAS_DMA
Selected by
- SND_ATMEL_SOC_SSC && SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC
- SND_ATMEL_SOC_SSC_PDC && SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC && ATMEL_SSC
vim +880 drivers/tty/hvc/hvc_console.c
870
871 static void hvc_poll_put_char(struct tty_driver *driver, int line, char ch)
872 {
873 struct tty_struct *tty = driver->ttys[0];
874 struct hvc_struct *hp = tty->driver_data;
875 int n;
876
877 hp->out_ch = ch;
878
879 do {
> 880 n = hp->ops->put_chars(hp->vtermno, hp->out_ch, 1);
881 } while (n <= 0);
882 }
883 #endif
884
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
ld.lld: error: initramfs.c:(function wait_for_initramfs: .text+0x0): relocation R_RISCV_HI20 out of range: 529135 is not in
by kernel test robot
CC: linux-kernel(a)vger.kernel.org
TO: Yifan Zhang <yifan1.zhang(a)amd.com>
CC: Alex Deucher <alexander.deucher(a)amd.com>
CC: Felix Kuehling <Felix.Kuehling(a)amd.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 614cb2751d3150850d459bee596c397f344a7936
commit: 4cbbe34807938e6e494e535a68d5ff64edac3f20 drm/amdgpu/gfx9: fix the doorbell missing when in CGPG issue.
date: 9 weeks ago
config: riscv-randconfig-r036-20210817 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 2c6448cdc2f68f8c28fd0bd9404182b81306e6e6)
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 riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 4cbbe34807938e6e494e535a68d5ff64edac3f20
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
ld.lld: error: cpu.c:(function riscv_of_processor_hartid: .text+0x20): relocation R_RISCV_HI20 out of range: 528532 is not in [-524288, 524287]
>> ld.lld: error: initramfs.c:(function wait_for_initramfs: .text+0x0): relocation R_RISCV_HI20 out of range: 529135 is not in [-524288, 524287]
ld.lld: error: signal.c:(function sys_rt_sigreturn: .text+0x1C): relocation R_RISCV_HI20 out of range: 524312 is not in [-524288, 524287]; references do_no_restart_syscall
>>> defined in kernel/built-in.a(signal.o)
--
>> ld.lld: error: smpboot.c:(function __cpu_up: .text+0xA): relocation R_RISCV_HI20 out of range: 528568 is not in [-524288, 524287]; references cpu_ops
>>> defined in arch/riscv/built-in.a(kernel/cpu_ops.o)
--
>> ld.lld: error: ptrace.c:(function __traceiter_sys_enter: .text+0xA): relocation R_RISCV_HI20 out of range: 529122 is not in [-524288, 524287]; references __tracepoint_sys_enter
>>> defined in arch/riscv/built-in.a(kernel/ptrace.o)
--
>> ld.lld: error: traps.c:(function die: .text+0x16): relocation R_RISCV_HI20 out of range: 528783 is not in [-524288, 524287]
>> ld.lld: error: ptrace.c:(function __traceiter_sys_exit: .text+0x42): relocation R_RISCV_HI20 out of range: 529122 is not in [-524288, 524287]; references __tracepoint_sys_exit
>>> defined in arch/riscv/built-in.a(kernel/ptrace.o)
--
>> ld.lld: error: calibrate.c:(function calibrate_delay: .text+0x16): relocation R_RISCV_HI20 out of range: 532360 is not in [-524288, 524287]; references __per_cpu_offset
>>> defined in mm/built-in.a(percpu.o)
--
ld.lld: error: patch.c:(function patch_text: .text+0x30): relocation R_RISCV_HI20 out of range: 524292 is not in [-524288, 524287]
>> ld.lld: error: process.c:(function show_regs: .text+0x14): relocation R_RISCV_HI20 out of range: 528544 is not in [-524288, 524287]
ld.lld: error: main.c:(function __traceiter_initcall_start: .text+0x38): relocation R_RISCV_HI20 out of range: 529122 is not in [-524288, 524287]; references __tracepoint_initcall_start
>>> defined in init/built-in.a(main.o)
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for LOCKDEP
Depends on DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT && (FRAME_POINTER || MIPS || PPC || S390 || MICROBLAZE || ARM || ARC || X86)
Selected by
- PROVE_LOCKING && DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
- LOCK_STAT && DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
- DEBUG_LOCK_ALLOC && DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
drivers/gpu/drm/bridge/analogix/anx7625.c:754:4: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 614cb2751d3150850d459bee596c397f344a7936
commit: c489573b5b6ce6442ad4658d9d5ec77839b91622 Merge drm/drm-next into drm-misc-next
date: 10 months ago
config: x86_64-randconfig-c001-20210813 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 767496d19cb9a1fbba57ff08095faa161998ee36)
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...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout c489573b5b6ce6442ad4658d9d5ec77839b91622
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 clang-analyzer
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
^ ~
net/9p/client.c:2093:2: note: Value stored to 'err' is never read
err = 0;
^ ~
net/9p/client.c:2153:2: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores]
err = 0;
^ ~
net/9p/client.c:2153:2: note: Value stored to 'err' is never read
err = 0;
^ ~
net/9p/client.c:2184:2: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores]
err = 0;
^ ~
net/9p/client.c:2184:2: note: Value stored to 'err' is never read
err = 0;
^ ~
net/9p/client.c:2214:2: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores]
err = 0;
^ ~
net/9p/client.c:2214:2: note: Value stored to 'err' is never read
err = 0;
^ ~
net/9p/client.c:2247:2: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores]
err = 0;
^ ~
net/9p/client.c:2247:2: note: Value stored to 'err' is never read
err = 0;
^ ~
net/9p/client.c:2281:2: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores]
err = 0;
^ ~
net/9p/client.c:2281:2: note: Value stored to 'err' is never read
err = 0;
^ ~
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
5 warnings generated.
fs/jffs2/nodelist.c:600:9: warning: Access to field 'flash_offset' results in a dereference of a null pointer (loaded from variable 'ref') [clang-analyzer-core.NullDereference]
while (ref->flash_offset != REF_EMPTY_NODE) {
^
fs/jffs2/nodelist.c:665:6: note: Assuming 'size' is not equal to 0
if (!size)
^~~~~
fs/jffs2/nodelist.c:665:2: note: Taking false branch
if (!size)
^
fs/jffs2/nodelist.c:667:15: note: Assuming 'size' is <= field 'free_size'
if (unlikely(size > jeb->free_size)) {
^
include/linux/compiler.h:78:42: note: expanded from macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
fs/jffs2/nodelist.c:667:2: note: Taking false branch
if (unlikely(size > jeb->free_size)) {
^
fs/jffs2/nodelist.c:673:6: note: Assuming field 'last_node' is null
if (jeb->last_node && ref_obsolete(jeb->last_node)) {
^~~~~~~~~~~~~~
fs/jffs2/nodelist.c:673:21: note: Left side of '&&' is false
if (jeb->last_node && ref_obsolete(jeb->last_node)) {
^
fs/jffs2/nodelist.c:685:3: note: Calling 'jffs2_link_node_ref'
jffs2_link_node_ref(c, jeb, ofs, size, NULL);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/jffs2/nodelist.c:592:9: note: Assuming field 'allocated_refs' is not equal to 0
BUG_ON(!jeb->allocated_refs);
^
include/asm-generic/bug.h:63:45: note: expanded from macro 'BUG_ON'
#define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
^~~~~~~~~
include/linux/compiler.h:78:42: note: expanded from macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
fs/jffs2/nodelist.c:592:2: note: Taking false branch
BUG_ON(!jeb->allocated_refs);
^
include/asm-generic/bug.h:63:32: note: expanded from macro 'BUG_ON'
#define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
^
fs/jffs2/nodelist.c:592:2: note: Loop condition is false. Exiting loop
BUG_ON(!jeb->allocated_refs);
^
include/asm-generic/bug.h:63:27: note: expanded from macro 'BUG_ON'
#define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
^
fs/jffs2/nodelist.c:595:2: note: Null pointer value stored to 'ref'
ref = jeb->last_node;
^~~~~~~~~~~~~~~~~~~~
fs/jffs2/nodelist.c:600:9: note: Access to field 'flash_offset' results in a dereference of a null pointer (loaded from variable 'ref')
while (ref->flash_offset != REF_EMPTY_NODE) {
^~~
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
4 warnings generated.
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
4 warnings generated.
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
>> drivers/gpu/drm/bridge/analogix/anx7625.c:754:4: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
ret = sp_tx_rst_aux(ctx);
^ ~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/bridge/analogix/anx7625.c:754:4: note: Value stored to 'ret' is never read
ret = sp_tx_rst_aux(ctx);
^ ~~~~~~~~~~~~~~~~~~
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c:536:2: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores]
err = anx78xx_clear_bits(anx78xx->map[I2C_IDX_TX_P2],
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c:536:2: note: Value stored to 'err' is never read
err = anx78xx_clear_bits(anx78xx->map[I2C_IDX_TX_P2],
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 7 warnings (7 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
Suppressed 7 warnings (7 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c:424:2: warning: Value stored to 'reg' is never read [clang-analyzer-deadcode.DeadStores]
reg = readl(dp->reg_base + ANALOGIX_DP_SYS_CTL_3);
^
drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c:424:2: note: Value stored to 'reg' is never read
Suppressed 7 warnings (6 in non-user code, 1 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
5 warnings generated.
Suppressed 5 warnings (5 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
11 warnings generated.
Suppressed 11 warnings (11 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
11 warnings generated.
Suppressed 11 warnings (11 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
11 warnings generated.
Suppressed 11 warnings (11 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
5 warnings generated.
drivers/iio/magnetometer/hmc5843_core.c:127:8: warning: Excessive padding in 'struct hmc5843_chip_info' (8 padding bytes, where 0 is optimal).
Optimal fields order:
channels,
regval_to_samp_freq,
regval_to_nanoscale,
n_regval_to_samp_freq,
n_regval_to_nanoscale,
consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding]
struct hmc5843_chip_info {
~~~~~~~^~~~~~~~~~~~~~~~~~~
drivers/iio/magnetometer/hmc5843_core.c:127:8: note: Excessive padding in 'struct hmc5843_chip_info' (8 padding bytes, where 0 is optimal). Optimal fields order: channels, regval_to_samp_freq, regval_to_nanoscale, n_regval_to_samp_freq, n_regval_to_nanoscale, consider reordering the fields or adding explicit padding members
struct hmc5843_chip_info {
~~~~~~~^~~~~~~~~~~~~~~~~~~
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
4 warnings generated.
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
drivers/iio/potentiometer/mcp41010.c:58:8: warning: Excessive padding in 'struct mcp41010_data' (86 padding bytes, where 22 is optimal).
Optimal fields order:
buf,
value,
spi,
cfg,
lock,
consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding]
struct mcp41010_data {
~~~~~~~^~~~~~~~~~~~~~~
drivers/iio/potentiometer/mcp41010.c:58:8: note: Excessive padding in 'struct mcp41010_data' (86 padding bytes, where 22 is optimal). Optimal fields order: buf, value, spi, cfg, lock, consider reordering the fields or adding explicit padding members
struct mcp41010_data {
~~~~~~~^~~~~~~~~~~~~~~
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
4 warnings generated.
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
4 warnings generated.
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
4 warnings generated.
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
4 warnings generated.
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
4 warnings generated.
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
4 warnings generated.
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
vim +/ret +754 drivers/gpu/drm/bridge/analogix/anx7625.c
8bdfc5dae4e3ba Xin Ji 2020-09-18 720
8bdfc5dae4e3ba Xin Ji 2020-09-18 721 static int segments_edid_read(struct anx7625_data *ctx,
8bdfc5dae4e3ba Xin Ji 2020-09-18 722 u8 segment, u8 *buf, u8 offset)
8bdfc5dae4e3ba Xin Ji 2020-09-18 723 {
8bdfc5dae4e3ba Xin Ji 2020-09-18 724 u8 cnt;
8bdfc5dae4e3ba Xin Ji 2020-09-18 725 int ret;
8bdfc5dae4e3ba Xin Ji 2020-09-18 726 struct device *dev = &ctx->client->dev;
8bdfc5dae4e3ba Xin Ji 2020-09-18 727
8bdfc5dae4e3ba Xin Ji 2020-09-18 728 /* Write address only */
8bdfc5dae4e3ba Xin Ji 2020-09-18 729 ret = anx7625_reg_write(ctx, ctx->i2c.rx_p0_client,
8bdfc5dae4e3ba Xin Ji 2020-09-18 730 AP_AUX_ADDR_7_0, 0x30);
8bdfc5dae4e3ba Xin Ji 2020-09-18 731 ret |= anx7625_reg_write(ctx, ctx->i2c.rx_p0_client,
8bdfc5dae4e3ba Xin Ji 2020-09-18 732 AP_AUX_COMMAND, 0x04);
8bdfc5dae4e3ba Xin Ji 2020-09-18 733 ret |= anx7625_reg_write(ctx, ctx->i2c.rx_p0_client,
8bdfc5dae4e3ba Xin Ji 2020-09-18 734 AP_AUX_CTRL_STATUS,
8bdfc5dae4e3ba Xin Ji 2020-09-18 735 AP_AUX_CTRL_ADDRONLY | AP_AUX_CTRL_OP_EN);
8bdfc5dae4e3ba Xin Ji 2020-09-18 736
8bdfc5dae4e3ba Xin Ji 2020-09-18 737 ret |= wait_aux_op_finish(ctx);
8bdfc5dae4e3ba Xin Ji 2020-09-18 738 /* Write segment address */
8bdfc5dae4e3ba Xin Ji 2020-09-18 739 ret |= sp_tx_aux_wr(ctx, segment);
8bdfc5dae4e3ba Xin Ji 2020-09-18 740 /* Data read */
8bdfc5dae4e3ba Xin Ji 2020-09-18 741 ret |= anx7625_reg_write(ctx, ctx->i2c.rx_p0_client,
8bdfc5dae4e3ba Xin Ji 2020-09-18 742 AP_AUX_ADDR_7_0, 0x50);
8bdfc5dae4e3ba Xin Ji 2020-09-18 743 if (ret) {
8bdfc5dae4e3ba Xin Ji 2020-09-18 744 DRM_DEV_ERROR(dev, "IO error : aux initial fail.\n");
8bdfc5dae4e3ba Xin Ji 2020-09-18 745 return ret;
8bdfc5dae4e3ba Xin Ji 2020-09-18 746 }
8bdfc5dae4e3ba Xin Ji 2020-09-18 747
8bdfc5dae4e3ba Xin Ji 2020-09-18 748 for (cnt = 0; cnt <= EDID_TRY_CNT; cnt++) {
8bdfc5dae4e3ba Xin Ji 2020-09-18 749 sp_tx_aux_wr(ctx, offset);
8bdfc5dae4e3ba Xin Ji 2020-09-18 750 /* Set I2C read com 0x01 mot = 0 and read 16 bytes */
8bdfc5dae4e3ba Xin Ji 2020-09-18 751 ret = sp_tx_aux_rd(ctx, 0xf1);
8bdfc5dae4e3ba Xin Ji 2020-09-18 752
8bdfc5dae4e3ba Xin Ji 2020-09-18 753 if (ret) {
8bdfc5dae4e3ba Xin Ji 2020-09-18 @754 ret = sp_tx_rst_aux(ctx);
8bdfc5dae4e3ba Xin Ji 2020-09-18 755 DRM_DEV_ERROR(dev, "segment read fail, reset!\n");
8bdfc5dae4e3ba Xin Ji 2020-09-18 756 } else {
8bdfc5dae4e3ba Xin Ji 2020-09-18 757 ret = anx7625_reg_block_read(ctx, ctx->i2c.rx_p0_client,
8bdfc5dae4e3ba Xin Ji 2020-09-18 758 AP_AUX_BUFF_START,
8bdfc5dae4e3ba Xin Ji 2020-09-18 759 MAX_DPCD_BUFFER_SIZE, buf);
8bdfc5dae4e3ba Xin Ji 2020-09-18 760 if (ret > 0)
8bdfc5dae4e3ba Xin Ji 2020-09-18 761 break;
8bdfc5dae4e3ba Xin Ji 2020-09-18 762 }
8bdfc5dae4e3ba Xin Ji 2020-09-18 763 }
8bdfc5dae4e3ba Xin Ji 2020-09-18 764
8bdfc5dae4e3ba Xin Ji 2020-09-18 765 if (cnt > EDID_TRY_CNT)
8bdfc5dae4e3ba Xin Ji 2020-09-18 766 return -EIO;
8bdfc5dae4e3ba Xin Ji 2020-09-18 767
8bdfc5dae4e3ba Xin Ji 2020-09-18 768 return 0;
8bdfc5dae4e3ba Xin Ji 2020-09-18 769 }
8bdfc5dae4e3ba Xin Ji 2020-09-18 770
:::::: The code at line 754 was first introduced by commit
:::::: 8bdfc5dae4e3ba4d99dfb430ef43249e5f1b7730 drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP
:::::: TO: Xin Ji <xji(a)analogixsemi.com>
:::::: CC: Sam Ravnborg <sam(a)ravnborg.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[RFC PATCH] bpf: lbr: __pcpu_scope_bpf_lbr_entries can be static
by kernel test robot
arch/x86/events/intel/lbr.c:1866:1: warning: symbol '__pcpu_scope_bpf_lbr_entries' was not declared. Should it be static?
arch/x86/events/intel/lbr.c:1867:1: warning: symbol '__pcpu_scope_bpf_lbr_cnt' was not declared. Should it be static?
Reported-by: kernel test robot <lkp(a)intel.com>
Signed-off-by: kernel test robot <lkp(a)intel.com>
---
lbr.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/events/intel/lbr.c b/arch/x86/events/intel/lbr.c
index e4e863f6fb93d..e3116c10c3b7e 100644
--- a/arch/x86/events/intel/lbr.c
+++ b/arch/x86/events/intel/lbr.c
@@ -1863,8 +1863,8 @@ struct event_constraint vlbr_constraint =
__EVENT_CONSTRAINT(INTEL_FIXED_VLBR_EVENT, (1ULL << INTEL_PMC_IDX_FIXED_VLBR),
FIXED_EVENT_FLAGS, 1, 0, PERF_X86_EVENT_LBR_SELECT);
-DEFINE_PER_CPU(struct perf_branch_entry, bpf_lbr_entries[MAX_LBR_ENTRIES]);
-DEFINE_PER_CPU(int, bpf_lbr_cnt);
+static DEFINE_PER_CPU(struct perf_branch_entry, bpf_lbr_entries[MAX_LBR_ENTRIES]);
+static DEFINE_PER_CPU(int, bpf_lbr_cnt);
int bpf_branch_record_read(void)
{
1 year, 1 month
include/linux/compiler_types.h:326:45: error: call to '__compiletime_assert_562' declared with attribute error: BUILD_BUG_ON failed: sizeof(struct abort_entry_24xx) != 64
by kernel test robot
Hi Bikash,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 614cb2751d3150850d459bee596c397f344a7936
commit: a04658594399e1fa25f984601b77ee840e6aaf01 scsi: qla2xxx: Wait for ABTS response on I/O timeouts for NVMe
date: 7 months ago
config: arm-buildonly-randconfig-r002-20210818 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.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...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout a04658594399e1fa25f984601b77ee840e6aaf01
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm SHELL=/bin/bash drivers/scsi/qla2xxx/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from <command-line>:
drivers/scsi/qla2xxx/qla_os.c: In function 'qla2x00_module_init':
include/linux/compiler_types.h:326:45: error: call to '__compiletime_assert_554' declared with attribute error: BUILD_BUG_ON failed: sizeof(cmd_a64_entry_t) != 64
326 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:307:25: note: in definition of macro '__compiletime_assert'
307 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:326:9: note: in expansion of macro '_compiletime_assert'
326 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
drivers/scsi/qla2xxx/qla_os.c:7782:9: note: in expansion of macro 'BUILD_BUG_ON'
7782 | BUILD_BUG_ON(sizeof(cmd_a64_entry_t) != 64);
| ^~~~~~~~~~~~
include/linux/compiler_types.h:326:45: error: call to '__compiletime_assert_555' declared with attribute error: BUILD_BUG_ON failed: sizeof(cmd_entry_t) != 64
326 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:307:25: note: in definition of macro '__compiletime_assert'
307 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:326:9: note: in expansion of macro '_compiletime_assert'
326 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
drivers/scsi/qla2xxx/qla_os.c:7783:9: note: in expansion of macro 'BUILD_BUG_ON'
7783 | BUILD_BUG_ON(sizeof(cmd_entry_t) != 64);
| ^~~~~~~~~~~~
include/linux/compiler_types.h:326:45: error: call to '__compiletime_assert_559' declared with attribute error: BUILD_BUG_ON failed: sizeof(mrk_entry_t) != 64
326 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:307:25: note: in definition of macro '__compiletime_assert'
307 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:326:9: note: in expansion of macro '_compiletime_assert'
326 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
drivers/scsi/qla2xxx/qla_os.c:7787:9: note: in expansion of macro 'BUILD_BUG_ON'
7787 | BUILD_BUG_ON(sizeof(mrk_entry_t) != 64);
| ^~~~~~~~~~~~
include/linux/compiler_types.h:326:45: error: call to '__compiletime_assert_560' declared with attribute error: BUILD_BUG_ON failed: sizeof(ms_iocb_entry_t) != 64
326 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:307:25: note: in definition of macro '__compiletime_assert'
307 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:326:9: note: in expansion of macro '_compiletime_assert'
326 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
drivers/scsi/qla2xxx/qla_os.c:7788:9: note: in expansion of macro 'BUILD_BUG_ON'
7788 | BUILD_BUG_ON(sizeof(ms_iocb_entry_t) != 64);
| ^~~~~~~~~~~~
include/linux/compiler_types.h:326:45: error: call to '__compiletime_assert_561' declared with attribute error: BUILD_BUG_ON failed: sizeof(request_t) != 64
326 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:307:25: note: in definition of macro '__compiletime_assert'
307 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:326:9: note: in expansion of macro '_compiletime_assert'
326 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
drivers/scsi/qla2xxx/qla_os.c:7789:9: note: in expansion of macro 'BUILD_BUG_ON'
7789 | BUILD_BUG_ON(sizeof(request_t) != 64);
| ^~~~~~~~~~~~
>> include/linux/compiler_types.h:326:45: error: call to '__compiletime_assert_562' declared with attribute error: BUILD_BUG_ON failed: sizeof(struct abort_entry_24xx) != 64
326 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:307:25: note: in definition of macro '__compiletime_assert'
307 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:326:9: note: in expansion of macro '_compiletime_assert'
326 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
drivers/scsi/qla2xxx/qla_os.c:7790:9: note: in expansion of macro 'BUILD_BUG_ON'
7790 | BUILD_BUG_ON(sizeof(struct abort_entry_24xx) != 64);
| ^~~~~~~~~~~~
include/linux/compiler_types.h:326:45: error: call to '__compiletime_assert_580' declared with attribute error: BUILD_BUG_ON failed: sizeof(struct ctio_crc2_to_fw) != 64
326 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:307:25: note: in definition of macro '__compiletime_assert'
307 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:326:9: note: in expansion of macro '_compiletime_assert'
326 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
drivers/scsi/qla2xxx/qla_os.c:7808:9: note: in expansion of macro 'BUILD_BUG_ON'
7808 | BUILD_BUG_ON(sizeof(struct ctio_crc2_to_fw) != 64);
| ^~~~~~~~~~~~
include/linux/compiler_types.h:326:45: error: call to '__compiletime_assert_583' declared with attribute error: BUILD_BUG_ON failed: sizeof(struct device_reg_2xxx) != 256
326 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:307:25: note: in definition of macro '__compiletime_assert'
307 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:326:9: note: in expansion of macro '_compiletime_assert'
326 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
drivers/scsi/qla2xxx/qla_os.c:7811:9: note: in expansion of macro 'BUILD_BUG_ON'
7811 | BUILD_BUG_ON(sizeof(struct device_reg_2xxx) != 256);
| ^~~~~~~~~~~~
include/linux/compiler_types.h:326:45: error: call to '__compiletime_assert_589' declared with attribute error: BUILD_BUG_ON failed: sizeof(struct imm_ntfy_from_isp) != 64
326 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:307:25: note: in definition of macro '__compiletime_assert'
307 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:326:9: note: in expansion of macro '_compiletime_assert'
326 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
drivers/scsi/qla2xxx/qla_os.c:7817:9: note: in expansion of macro 'BUILD_BUG_ON'
7817 | BUILD_BUG_ON(sizeof(struct imm_ntfy_from_isp) != 64);
| ^~~~~~~~~~~~
include/linux/compiler_types.h:326:45: error: call to '__compiletime_assert_593' declared with attribute error: BUILD_BUG_ON failed: sizeof(struct mbx_entry) != 64
326 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:307:25: note: in definition of macro '__compiletime_assert'
307 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:326:9: note: in expansion of macro '_compiletime_assert'
326 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
drivers/scsi/qla2xxx/qla_os.c:7821:9: note: in expansion of macro 'BUILD_BUG_ON'
7821 | BUILD_BUG_ON(sizeof(struct mbx_entry) != 64);
| ^~~~~~~~~~~~
include/linux/compiler_types.h:326:45: error: call to '__compiletime_assert_599' declared with attribute error: BUILD_BUG_ON failed: sizeof(struct pt_ls4_rx_unsol) != 64
326 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:307:25: note: in definition of macro '__compiletime_assert'
307 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:326:9: note: in expansion of macro '_compiletime_assert'
326 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
vim +/__compiletime_assert_562 +326 include/linux/compiler_types.h
eb5c2d4b45e3d2 Will Deacon 2020-07-21 312
eb5c2d4b45e3d2 Will Deacon 2020-07-21 313 #define _compiletime_assert(condition, msg, prefix, suffix) \
eb5c2d4b45e3d2 Will Deacon 2020-07-21 314 __compiletime_assert(condition, msg, prefix, suffix)
eb5c2d4b45e3d2 Will Deacon 2020-07-21 315
eb5c2d4b45e3d2 Will Deacon 2020-07-21 316 /**
eb5c2d4b45e3d2 Will Deacon 2020-07-21 317 * compiletime_assert - break build and emit msg if condition is false
eb5c2d4b45e3d2 Will Deacon 2020-07-21 318 * @condition: a compile-time constant condition to check
eb5c2d4b45e3d2 Will Deacon 2020-07-21 319 * @msg: a message to emit if condition is false
eb5c2d4b45e3d2 Will Deacon 2020-07-21 320 *
eb5c2d4b45e3d2 Will Deacon 2020-07-21 321 * In tradition of POSIX assert, this macro will break the build if the
eb5c2d4b45e3d2 Will Deacon 2020-07-21 322 * supplied condition is *false*, emitting the supplied error message if the
eb5c2d4b45e3d2 Will Deacon 2020-07-21 323 * compiler has support to do so.
eb5c2d4b45e3d2 Will Deacon 2020-07-21 324 */
eb5c2d4b45e3d2 Will Deacon 2020-07-21 325 #define compiletime_assert(condition, msg) \
eb5c2d4b45e3d2 Will Deacon 2020-07-21 @326 _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
eb5c2d4b45e3d2 Will Deacon 2020-07-21 327
:::::: The code at line 326 was first introduced by commit
:::::: eb5c2d4b45e3d2d5d052ea6b8f1463976b1020d5 compiler.h: Move compiletime_assert() macros into compiler_types.h
:::::: TO: Will Deacon <will(a)kernel.org>
:::::: CC: Will Deacon <will(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month