include/linux/list.h:69:(.text+0x338f): dangerous relocation: windowed longcall crosses 1GB boundary; return may fail: *UND*

From: kernel test robot
Date: Fri Apr 05 2024 - 21:01:23 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8a05ef7087166d7fa0de986fb6a2d97850dbd551
commit: 481461f5109919babbb393d6f68002936b8e2493 linux/export.h: make <linux/export.h> independent of CONFIG_MODULES
date: 9 months ago
config: xtensa-randconfig-r012-20230616 (https://download.01.org/0day-ci/archive/20240406/202404060846.sebDx4Nj-lkp@xxxxxxxxx/config)
compiler: xtensa-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240406/202404060846.sebDx4Nj-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202404060846.sebDx4Nj-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

drivers/media/common/siano/smscoreapi.o: in function `smscore_register_hotplug':
>> include/linux/list.h:69:(.text+0x338f): dangerous relocation: windowed longcall crosses 1GB boundary; return may fail: *UND*


vim +69 include/linux/list.h

d7c816733d501b Kees Cook 2016-08-17 58
^1da177e4c3f41 Linus Torvalds 2005-04-16 59 /*
^1da177e4c3f41 Linus Torvalds 2005-04-16 60 * Insert a new entry between two known consecutive entries.
^1da177e4c3f41 Linus Torvalds 2005-04-16 61 *
^1da177e4c3f41 Linus Torvalds 2005-04-16 62 * This is only for internal list manipulation where we know
^1da177e4c3f41 Linus Torvalds 2005-04-16 63 * the prev/next entries already!
^1da177e4c3f41 Linus Torvalds 2005-04-16 64 */
^1da177e4c3f41 Linus Torvalds 2005-04-16 65 static inline void __list_add(struct list_head *new,
^1da177e4c3f41 Linus Torvalds 2005-04-16 66 struct list_head *prev,
^1da177e4c3f41 Linus Torvalds 2005-04-16 67 struct list_head *next)
^1da177e4c3f41 Linus Torvalds 2005-04-16 68 {
d7c816733d501b Kees Cook 2016-08-17 @69 if (!__list_add_valid(new, prev, next))
d7c816733d501b Kees Cook 2016-08-17 70 return;
d7c816733d501b Kees Cook 2016-08-17 71
^1da177e4c3f41 Linus Torvalds 2005-04-16 72 next->prev = new;
^1da177e4c3f41 Linus Torvalds 2005-04-16 73 new->next = next;
^1da177e4c3f41 Linus Torvalds 2005-04-16 74 new->prev = prev;
1c97be677f72b3 Paul E. McKenney 2015-09-20 75 WRITE_ONCE(prev->next, new);
^1da177e4c3f41 Linus Torvalds 2005-04-16 76 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 77

:::::: The code at line 69 was first introduced by commit
:::::: d7c816733d501b59dbdc2483f2cc8e4431fd9160 list: Split list_add() debug checking into separate function

:::::: TO: Kees Cook <keescook@xxxxxxxxxxxx>
:::::: CC: Paul E. McKenney <paulmck@xxxxxxxxxxxxxxxxxx>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki