tree:
https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git x86/wip-rwx
head: f856355fba969168555e518db3906492f8ab5b03
commit: a1814c413b9cffdc5e4b3bd098c2ad0f8578dc5f [4/10] s390/module: Use
s390_kernel_write() for relocations
config: s390-allyesconfig (attached as .config)
compiler: s390-linux-gcc (GCC) 9.3.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 a1814c413b9cffdc5e4b3bd098c2ad0f8578dc5f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day GCC_VERSION=9.3.0 make.cross ARCH=s390
If you fix the issue, kindly add following tag as appropriate
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]
199 | write(loc, &val, 1);
| ^~~
| |
| Elf64_Addr {aka long long unsigned int}
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]
203 | write(loc, &tmp, 2);
| ^~~
| |
| Elf64_Addr {aka long long unsigned int}
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]
205 | write(loc, &val, 2);
| ^~~
| |
| Elf64_Addr {aka long long unsigned int}
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]
209 | write(loc, &tmp, 4);
| ^~~
| |
| Elf64_Addr {aka long long unsigned int}
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]
211 | write(loc, &val, 4);
| ^~~
| |
| Elf64_Addr {aka long long unsigned int}
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]
213 | write(loc, &val, 8);
| ^~~
| |
| Elf64_Addr {aka long long unsigned int}
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'
438 | rc = apply_rela(rela, base, symtab,
strtab, me);
| ^~~~~~~~~~
arch/s390/kernel/module.c:218:12: note: declared here
218 | static int apply_rela(Elf_Rela *rela, Elf_Addr base, Elf_Sym *symtab,
| ^~~~~~~~~~
arch/s390/kernel/module.c: In function 'apply_relocate_add':
arch/s390/kernel/module.c:453:24: warning: pointer type mismatch in conditional
expression
453 | early ? memcpy : s390_kernel_write);
| ^
arch/s390/kernel/module.c:449:6: warning: unused variable 'ret'
[-Wunused-variable]
449 | int ret;
| ^~~
vim +/apply_rela +438 arch/s390/kernel/module.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 418
a1814c413b9cff Peter Zijlstra 2020-04-14 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,
a1814c413b9cff Peter Zijlstra 2020-04-14 421 struct module *me,
a1814c413b9cff Peter Zijlstra 2020-04-14 422 void (*write)(void *dest,
const void *src, 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