* [RESEND V2] modprobe: ERROR: could not insert 'ipv6': Exec format error / module ipv6: Unknown relocation: 72
@ 2019-06-08 12:52 Jeroen Roovers
2019-06-08 13:41 ` Helge Deller
2019-06-08 13:50 ` [RESEND V2] modprobe: ERROR: could not insert 'ipv6': Exec format error / module ipv6: Unknown relocation: 72 John David Anglin
0 siblings, 2 replies; 7+ messages in thread
From: Jeroen Roovers @ 2019-06-08 12:52 UTC (permalink / raw)
To: linux-parisc; +Cc: hppa
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [RESEND V2] modprobe: ERROR: could not insert 'ipv6': Exec format error / module ipv6: Unknown relocation: 72
2019-06-08 12:52 [RESEND V2] modprobe: ERROR: could not insert 'ipv6': Exec format error / module ipv6: Unknown relocation: 72 Jeroen Roovers
@ 2019-06-08 13:41 ` Helge Deller
2019-06-08 13:51 ` Jeroen Roovers
2019-06-08 14:32 ` Helge Deller
2019-06-08 13:50 ` [RESEND V2] modprobe: ERROR: could not insert 'ipv6': Exec format error / module ipv6: Unknown relocation: 72 John David Anglin
1 sibling, 2 replies; 7+ messages in thread
From: Helge Deller @ 2019-06-08 13:41 UTC (permalink / raw)
To: Jeroen Roovers, linux-parisc; +Cc: hppa
[-- Attachment #1: Type: text/plain, Size: 363 bytes --]
On 08.06.19 14:52, Jeroen Roovers wrote:
> # 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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: pcrel64.patch --]
[-- Type: text/x-patch; name="pcrel64.patch", Size: 537 bytes --]
diff --git a/arch/parisc/kernel/module.c b/arch/parisc/kernel/module.c
index eab964a8bf4b..ac5f34993b53 100644
--- a/arch/parisc/kernel/module.c
+++ b/arch/parisc/kernel/module.c
@@ -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;
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [RESEND V2] modprobe: ERROR: could not insert 'ipv6': Exec format error / module ipv6: Unknown relocation: 72
2019-06-08 12:52 [RESEND V2] modprobe: ERROR: could not insert 'ipv6': Exec format error / module ipv6: Unknown relocation: 72 Jeroen Roovers
2019-06-08 13:41 ` Helge Deller
@ 2019-06-08 13:50 ` John David Anglin
1 sibling, 0 replies; 7+ messages in thread
From: John David Anglin @ 2019-06-08 13:50 UTC (permalink / raw)
To: Jeroen Roovers, linux-parisc; +Cc: hppa
On 2019-06-08 8:52 a.m., Jeroen Roovers wrote:
> 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
Relocation 72 is R_PARISC_PCREL64. It would be created in assembler using
something like:
.dword symbol-.
>
> # 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?
You could find how it's created by looking at assembler for nf_conntrack.
Dave
--
John David Anglin dave.anglin@bell.net
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [RESEND V2] modprobe: ERROR: could not insert 'ipv6': Exec format error / module ipv6: Unknown relocation: 72
2019-06-08 13:41 ` Helge Deller
@ 2019-06-08 13:51 ` Jeroen Roovers
2019-06-08 14:32 ` Helge Deller
1 sibling, 0 replies; 7+ messages in thread
From: Jeroen Roovers @ 2019-06-08 13:51 UTC (permalink / raw)
To: Helge Deller; +Cc: linux-parisc, hppa
On Sat, 8 Jun 2019 15:41:45 +0200
Helge Deller <deller@gmx.de> wrote:
> You could try attached untested patch.
I will.
> Can you send your .config ?
I have uploaded it here: https://dev.gentoo.org/~jer/c8000.config
Regards,
jer
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [RESEND V2] modprobe: ERROR: could not insert 'ipv6': Exec format error / module ipv6: Unknown relocation: 72
2019-06-08 13:41 ` Helge Deller
2019-06-08 13:51 ` Jeroen Roovers
@ 2019-06-08 14:32 ` Helge Deller
2019-06-08 14:49 ` Jeroen Roovers
1 sibling, 1 reply; 7+ messages in thread
From: Helge Deller @ 2019-06-08 14:32 UTC (permalink / raw)
To: Jeroen Roovers, linux-parisc; +Cc: hppa
On 08.06.19 15:41, Helge Deller wrote:
> On 08.06.19 14:52, Jeroen Roovers wrote:
>> # 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 ?
-> 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [RESEND V2] modprobe: ERROR: could not insert 'ipv6': Exec format error / module ipv6: Unknown relocation: 72
2019-06-08 14:32 ` Helge Deller
@ 2019-06-08 14:49 ` Jeroen Roovers
2019-06-08 18:04 ` [PATCH] parisc: Fix module loading error with JUMP_LABEL feature Helge Deller
0 siblings, 1 reply; 7+ messages in thread
From: Jeroen Roovers @ 2019-06-08 14:49 UTC (permalink / raw)
To: Helge Deller; +Cc: linux-parisc, hppa
On Sat, 8 Jun 2019 16:32:47 +0200
Helge Deller <deller@gmx.de> wrote:
> Jeroen, I think the last patch I sent to you should help...
It does!
jer
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] parisc: Fix module loading error with JUMP_LABEL feature
2019-06-08 14:49 ` Jeroen Roovers
@ 2019-06-08 18:04 ` Helge Deller
0 siblings, 0 replies; 7+ messages in thread
From: Helge Deller @ 2019-06-08 18:04 UTC (permalink / raw)
To: Jeroen Roovers; +Cc: linux-parisc, hppa
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
Reported-by: Jeroen Roovers <jer@gentoo.org>
Tested-by: Jeroen Roovers <jer@gentoo.org>
Fixes: 62217beb394e ("parisc: Add static branch and JUMP_LABEL feature")
Signed-off-by: Helge Deller <deller@gmx.de>
diff --git a/arch/parisc/kernel/module.c b/arch/parisc/kernel/module.c
index f241ded9239b..1f0f29a289d3 100644
--- a/arch/parisc/kernel/module.c
+++ b/arch/parisc/kernel/module.c
@@ -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;
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2019-06-08 18:04 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-08 12:52 [RESEND V2] modprobe: ERROR: could not insert 'ipv6': Exec format error / module ipv6: Unknown relocation: 72 Jeroen Roovers
2019-06-08 13:41 ` Helge Deller
2019-06-08 13:51 ` Jeroen Roovers
2019-06-08 14:32 ` Helge Deller
2019-06-08 14:49 ` Jeroen Roovers
2019-06-08 18:04 ` [PATCH] parisc: Fix module loading error with JUMP_LABEL feature Helge Deller
2019-06-08 13:50 ` [RESEND V2] modprobe: ERROR: could not insert 'ipv6': Exec format error / module ipv6: Unknown relocation: 72 John David Anglin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).