tree:
https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git x86/wip-rwx
head: cba59464a245aa3688f081e8cae797edeff2ea92
commit: 4073a4befd02accef30a0899a01d78882c2ad9e5 [4/6] livepatch: Use text_poke() for
relocations
config: s390-debug_defconfig (attached as .config)
compiler: s390-linux-gcc (GCC) 7.5.0
reproduce:
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 4073a4befd02accef30a0899a01d78882c2ad9e5
# save the attached .config to linux build tree
GCC_VERSION=7.5.0 make.cross ARCH=s390
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
arch/s390/kernel/module.c: In function 'apply_rela_bits':
arch/s390/kernel/module.c:199:9: warning: passing argument 1 of 'write' makes
pointer from integer without a cast [-Wint-conversion]
write(loc, &val, 1);
^~~
arch/s390/kernel/module.c:199:9: note: expected 'void *' but argument is of
type 'Elf64_Addr {aka long long unsigned int}'
arch/s390/kernel/module.c:203:9: warning: passing argument 1 of 'write' makes
pointer from integer without a cast [-Wint-conversion]
write(loc, &tmp, 2);
^~~
arch/s390/kernel/module.c:203:9: note: expected 'void *' but argument is of
type 'Elf64_Addr {aka long long unsigned int}'
arch/s390/kernel/module.c:205:9: warning: passing argument 1 of 'write' makes
pointer from integer without a cast [-Wint-conversion]
write(loc, &val, 2);
^~~
arch/s390/kernel/module.c:205:9: note: expected 'void *' but argument is of
type 'Elf64_Addr {aka long long unsigned int}'
arch/s390/kernel/module.c:209:9: warning: passing argument 1 of 'write' makes
pointer from integer without a cast [-Wint-conversion]
write(loc, &tmp, 4);
^~~
arch/s390/kernel/module.c:209:9: note: expected 'void *' but argument is of
type 'Elf64_Addr {aka long long unsigned int}'
arch/s390/kernel/module.c:211:9: warning: passing argument 1 of 'write' makes
pointer from integer without a cast [-Wint-conversion]
write(loc, &val, 4);
^~~
arch/s390/kernel/module.c:211:9: note: expected 'void *' but argument is of
type 'Elf64_Addr {aka long long unsigned int}'
arch/s390/kernel/module.c:213:9: warning: passing argument 1 of 'write' makes
pointer from integer without a cast [-Wint-conversion]
write(loc, &val, 8);
^~~
arch/s390/kernel/module.c:213:9: note: expected 'void *' but argument is of
type 'Elf64_Addr {aka long long unsigned int}'
arch/s390/kernel/module.c: In function '__apply_relocate_add':
> arch/s390/kernel/module.c:438:8: error: too few arguments to
function 'apply_rela'
rc = apply_rela(rela, base, symtab, strtab,
me);
^~~~~~~~~~
arch/s390/kernel/module.c:218:12: note: declared here
static int apply_rela(Elf_Rela *rela, Elf_Addr base, Elf_Sym *symtab,
^~~~~~~~~~
vim +/apply_rela +438 arch/s390/kernel/module.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 418
4073a4befd02ac Peter Zijlstra 2019-10-21 419 static int
__apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab,
^1da177e4c3f41 Linus Torvalds 2005-04-16 420 unsigned int symindex,
unsigned int relsec,
4073a4befd02ac Peter Zijlstra 2019-10-21 421 struct module *me,
4073a4befd02ac Peter Zijlstra 2019-10-21 422 void (*write)(void *addr,
const void *data, size_t len))
^1da177e4c3f41 Linus Torvalds 2005-04-16 423 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 424 Elf_Addr base;
^1da177e4c3f41 Linus Torvalds 2005-04-16 425 Elf_Sym *symtab;
^1da177e4c3f41 Linus Torvalds 2005-04-16 426 Elf_Rela *rela;
^1da177e4c3f41 Linus Torvalds 2005-04-16 427 unsigned long i, n;
^1da177e4c3f41 Linus Torvalds 2005-04-16 428 int rc;
^1da177e4c3f41 Linus Torvalds 2005-04-16 429
^1da177e4c3f41 Linus Torvalds 2005-04-16 430 DEBUGP("Applying relocate section
%u to %u\n",
^1da177e4c3f41 Linus Torvalds 2005-04-16 431 relsec,
sechdrs[relsec].sh_info);
^1da177e4c3f41 Linus Torvalds 2005-04-16 432 base =
sechdrs[sechdrs[relsec].sh_info].sh_addr;
^1da177e4c3f41 Linus Torvalds 2005-04-16 433 symtab = (Elf_Sym *)
sechdrs[symindex].sh_addr;
^1da177e4c3f41 Linus Torvalds 2005-04-16 434 rela = (Elf_Rela *)
sechdrs[relsec].sh_addr;
^1da177e4c3f41 Linus Torvalds 2005-04-16 435 n = sechdrs[relsec].sh_size /
sizeof(Elf_Rela);
^1da177e4c3f41 Linus Torvalds 2005-04-16 436
^1da177e4c3f41 Linus Torvalds 2005-04-16 437 for (i = 0; i < n; i++, rela++) {
083e14c09b7ae0 Martin Schwidefsky 2013-01-11 @438 rc = apply_rela(rela, base, symtab,
strtab, me);
^1da177e4c3f41 Linus Torvalds 2005-04-16 439 if (rc)
^1da177e4c3f41 Linus Torvalds 2005-04-16 440 return rc;
^1da177e4c3f41 Linus Torvalds 2005-04-16 441 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 442 return 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 443 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 444
:::::: The code at line 438 was first introduced by commit
:::::: 083e14c09b7ae0247b9944a386fdc32cd0719da1 s390/modules: add relocation overflow
checking
:::::: TO: Martin Schwidefsky <schwidefsky(a)de.ibm.com>
:::::: CC: Martin Schwidefsky <schwidefsky(a)de.ibm.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org