tree:
https://git.kernel.org/pub/scm/linux/kernel/git/jpoimboe/linux.git dynrela
head: adb09db70e1407b457371ecf4e1aa9545178c46a
commit: adb09db70e1407b457371ecf4e1aa9545178c46a [2/2] it works
config: i386-defconfig (attached as .config)
compiler: gcc-7 (Debian 7.4.0-14) 7.4.0
reproduce:
git checkout adb09db70e1407b457371ecf4e1aa9545178c46a
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
kernel/module.c: In function 'apply_relocations':
> kernel/module.c:2331:43: error: passing argument 2 of
'klp_write_relocations' from incompatible pointer type
[-Werror=incompatible-pointer-types]
err =
klp_write_relocations(info->hdr, info->sechdrs,
^~~~
In file included from kernel/module.c:47:0:
include/linux/livepatch.h:232:19: note: expected 'Elf64_Shdr * {aka struct
elf64_shdr *}' but argument is of type 'Elf32_Shdr * const {aka struct elf32_shdr
* const}'
static inline int klp_write_relocations(Elf_Ehdr *ehdr, Elf64_Shdr *sechdrs,
^~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/klp_write_relocations +2331 kernel/module.c
2312
2313 static int apply_relocations(struct module *mod, const struct load_info *info)
2314 {
2315 unsigned int i;
2316 int err = 0;
2317
2318 /* Now do relocations. */
2319 for (i = 1; i < info->hdr->e_shnum; i++) {
2320 unsigned int infosec = info->sechdrs[i].sh_info;
2321
2322 /* Not a valid relocation section? */
2323 if (infosec >= info->hdr->e_shnum)
2324 continue;
2325
2326 /* Don't bother with non-allocated sections */
2327 if (!(info->sechdrs[infosec].sh_flags & SHF_ALLOC))
2328 continue;
2329
2330 if (info->sechdrs[i].sh_flags & SHF_RELA_LIVEPATCH)
2331 err = klp_write_relocations(info->hdr, info->sechdrs,
2332 info->secstrings,
2333 info->strtab,
2334 info->index.sym, mod, NULL);
2335 else if (info->sechdrs[i].sh_type == SHT_REL)
2336 err = apply_relocate(info->sechdrs, info->strtab,
2337 info->index.sym, i, mod);
2338 else if (info->sechdrs[i].sh_type == SHT_RELA)
2339 err = apply_relocate_add(info->sechdrs, info->strtab,
2340 info->index.sym, i, mod);
2341 if (err < 0)
2342 break;
2343 }
2344 return err;
2345 }
2346
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation