modprobe: ERROR: could not insert 'ipv6': Exec format error / module ipv6: Unknown relocation: 72
PATCH RESEND v2 1/1 modprobe: ERROR: could not insert 'ipv6': Exec format error / module ipv6: Unknown relocation: 72
Second resend. Not sure why e-mail from my Gentoo account and private account never arrive. Originally sent on 21 May 2019, but I still see this issue in 5.2.0-rc3-JeR-00077-g16d72dd4891f. I attached the kernel config in earlier attempts but I am leaving that out this time.
<Forwarded message:>
# modprobe -v ipv6 insmod /lib/modules/5.2.0-rc1-JeR/kernel/net/ipv6/ipv6.ko modprobe: ERROR: could not insert 'ipv6': Exec format error
dmesg:
module ipv6: Unknown relocation: 72
# modprobe -v nf_conntrack insmod /lib/modules/5.2.0-rc1-JeR/kernel/net/netfilter/nf_conntrack.ko modprobe: ERROR: could not insert 'nf_conntrack': Exec format error
dmesg:
module nf_conntrack: Unknown relocation: 72
Note that other modules are loaded properly. Any ideas?
Kind regards,
jer
--
System information:
Linux karsten 5.2.0-rc1-JeR #60 SMP Mon May 20 09:34:40 CEST 2019 parisc64 PA8800 (Mako) 9000/785/C8000 GNU/Linux
Linux version 5.2.0-rc1-JeR (root@karsten) (gcc version 8.3.0 (Gentoo 8.3.0 p1.0)) #60 SMP Mon May 20 09:34:40 CEST 2019
at commit commit a188339ca5a396acc588e5851ed7e19f66b0ebd9 (HEAD, tag:
v5.2-rc1, origin/master, origin/HEAD, master)
# hppa64-unknown-linux-gnu-gcc -v Using built-in specs. COLLECT_GCC=hppa64-unknown-linux-gnu-gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/hppa64-unknown-linux-gnu/8.3.0/lto-wrapper Target: hppa64-unknown-linux-gnu Configured with: /var/tmp/portage/sys-devel/kgcc64-8.3.0/work/gcc-8.3.0/configure --host=hppa2.0-unknown-linux-gnu --target=hppa64-unknown-linux-gnu --build=hppa2.0-unknown-linux-gnu --prefix=/usr --bindir=/usr/hppa2.0-unknown-linux-gnu/hppa64-unknown-linux-gnu/gcc-bin/8.3.0 --includedir=/usr/lib/gcc/hppa64-unknown-linux-gnu/8.3.0/include --datadir=/usr/share/gcc-data/hppa64-unknown-linux-gnu/8.3.0 --mandir=/usr/share/gcc-data/hppa64-unknown-linux-gnu/8.3.0/man --infodir=/usr/share/gcc-data/hppa64-unknown-linux-gnu/8.3.0/info --with-gxx-include-dir=/usr/lib/gcc/hppa64-unknown-linux-gnu/8.3.0/include/g++-v8 --with-python-dir=/share/gcc-data/hppa64-unknown-linux-gnu/8.3.0/python --enable-languages=c --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 8.3.0 p1.0' --disable-libstdcxx-pch --enable-poison-system-directories --disable-shared --disable-libatomic --disable-threads --without-headers --disable-bootstrap --enable-__cxa_atexit --enable-clocale=gnu --disable-multilib --disable-libgomp --disable-libmudflap --disable-libssp --disable-libquadmath --enable-lto --without-cloog --without-ppl Thread model: single gcc version 8.3.0 (Gentoo 8.3.0 p1.0)
# hppa64-unknown-linux-gnu-ld -v GNU ld (Gentoo 2.31.1 p5) 2.31.1
Helge Deller
maintainerQuoted 5 lines · Jeroen Roovers
# modprobe -v ipv6 insmod /lib/modules/5.2.0-rc1-JeR/kernel/net/ipv6/ipv6.ko modprobe: ERROR: could not insert 'ipv6': Exec format error dmesg: module ipv6: Unknown relocation: 72
You could try attached untested patch.
I still wonder why you get R_PARISC_PCREL64 relocations. Can you send your .config ?
Helge
arch/parisc/kernel/module.c +4 -0
@@ -780,6 +780,10 @@ int apply_relocate_add(Elf_Shdr *sechdrs,/* 32-bit PC relative address */ *loc = val - dot -8 + addend;break ; +case R_PARISC_PCREL64 : +/* 64-bit PC relative address */ + *loc64 = val - dot -8 + addend; +break ;case R_PARISC_DIR64 :/* 64-bit effective address */ *loc64 = val + addend;
Quoted 1 line · On Sat, 8 Jun 2019 15:41:45 +0200 Helge Deller <[email protected]> wrote:
You could try attached untested patch.
I will.
Quoted 1 line
Can you send your .config ?
I have uploaded it here: https://dev.gentoo.org/~jer/c8000.config
Regards,
jer
Helge Deller
maintainerQuoted 10 lines · Helge Deller
Quoted 5 lines · Jeroen Roovers
# modprobe -v ipv6 insmod /lib/modules/5.2.0-rc1-JeR/kernel/net/ipv6/ipv6.ko modprobe: ERROR: could not insert 'ipv6': Exec format error dmesg: module ipv6: Unknown relocation: 72You could try attached untested patch.
I still wonder why you getR_PARISC_PCREL64relocations. Can you send your .config ?
-> https://dev.gentoo.org/~jer/c8000.config
Thanks!
The R_PARISC_PCREL64 relocations are in the __jump_table section, so they were introduced by this commit:
parisc: Add static branch and JUMP_LABEL feature
See:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=62217beb394e654bbd2bb87c533dadd2d8bf62c6
Jeroen, I think the last patch I sent to you should help...
Helge
Quoted 1 line · On Sat, 8 Jun 2019 16:32:47 +0200 Helge Deller <[email protected]> wrote:
Jeroen, I think the last patch I sent to you should help...
It does!
jer
Helge Deller
maintainerPATCH 1/1 parisc: Fix module loading error with JUMP_LABEL feature
Commit 62217beb394e ("parisc: Add static branch and JUMP_LABEL feature") missed to add code to handle PCREL64 relocations which are generated when creating a jump label on a 64-bit kernel.
This patch fixes module load errors like this one:
# modprobe -v ipv6 insmod /lib/modules/5.2.0-rc1-JeR/kernel/net/ipv6/ipv6.ko modprobe: ERROR: could not insert 'ipv6': Exec format error dmesg reports: module ipv6: Unknown relocation: 72
arch/parisc/kernel/module.c +4 -0
@@ -786,6 +786,10 @@ int apply_relocate_add(Elf_Shdr *sechdrs,/* 32-bit PC relative address */ *loc = val - dot -8 + addend;break ; +case R_PARISC_PCREL64 : +/* 64-bit PC relative address */ + *loc64 = val - dot -8 + addend; +break ;case R_PARISC_DIR64 :/* 64-bit effective address */ *loc64 = val + addend;
Quoted 9 lines · Jeroen Roovers
Second resend. Not sure why e-mail from my Gentoo account and private account never arrive. Originally sent on 21 May 2019, but I still see this issue in 5.2.0-rc3-JeR-00077-g16d72dd4891f. I attached the kernel config in earlier attempts but I am leaving that out this time.
<Forwarded message:>
Quoted 6 lines
# modprobe -v ipv6 insmod /lib/modules/5.2.0-rc1-JeR/kernel/net/ipv6/ipv6.ko modprobe: ERROR: could not insert 'ipv6': Exec format errordmesg:
module ipv6: Unknown relocation: 72
Relocation 72 is R_PARISC_PCREL64. It would be created in assembler using something like:
.dword symbol-.
Quoted 9 lines
# modprobe -v nf_conntrack insmod /lib/modules/5.2.0-rc1-JeR/kernel/net/netfilter/nf_conntrack.ko modprobe: ERROR: could not insert 'nf_conntrack': Exec format errordmesg:
modulenf_conntrack: Unknown relocation: 72Note that other modules are loaded properly. Any ideas?
You could find how it's created by looking at assembler for nf_conntrack.
Dave
Signature · 1 line
John David Anglin [email protected]