From: Helge Deller <deller@gmx.de>
To: Mikulas Patocka <mpatocka@redhat.com>
Cc: linux-parisc@vger.kernel.org
Subject: Re: kernel 4.6-rc unbootable due to module changes
Date: Tue, 5 Apr 2016 20:54:18 +0200 [thread overview]
Message-ID: <570409DA.1060508@gmx.de> (raw)
In-Reply-To: <alpine.LRH.2.02.1604051332280.25453@file01.intranet.prod.int.rdu2.redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1483 bytes --]
On 05.04.2016 19:36, Mikulas Patocka wrote:
> On Tue, 5 Apr 2016, Mikulas Patocka wrote:
>
>> Hi
>>
>> The patch "parisc: Use generic extable search and sort routines" makes the
>> kernel unable to load any modules. It fails with:
>>
>> module unix: Unknown relocation: 9
>> modprobe: FATAL: Error inserting unix (/lib/modules/4.6.0-rc2/kernel/net/unix/unix.ko): Invalid module format
>>
>> When I revert the patch, the kernel 4.6-rc2 boots fine.
>>
>> Apparently, the function apply_relocate_add in arch/parisc/kernel/module.c
>> doesn't handle the new relocation type.
>>
>> Mikulas
>
> BTW. I'm using hppa64 binutils 2.21 to build the kernel. It generates the
> R_PARISC_PCREL32 relocation that the kernel module loader doesn't handle:
Can you try attached patch (untested) ?
Helge
> RELOCATION RECORDS FOR [__ex_table]:
> OFFSET TYPE VALUE
> 0000000000000000 R_PARISC_PCREL32 .text.unix_ioctl+0x0000000000000064
> 0000000000000004 R_PARISC_PCREL32 fixup_put_user_skip_1+0x0000000000000008
> 0000000000000008 R_PARISC_PCREL32 .text.unix_ioctl+0x00000000000000a8
> 000000000000000c R_PARISC_PCREL32 fixup_put_user_skip_1+0x0000000000000008
> 0000000000000010 R_PARISC_PCREL32 .text.unix_ioctl+0x00000000000000b4
> 0000000000000014 R_PARISC_PCREL32 fixup_put_user_skip_1+0x0000000000000008
> 0000000000000018 R_PARISC_PCREL32 .text.unix_ioctl+0x00000000000000c0
> 000000000000001c R_PARISC_PCREL32 fixup_put_user_skip_1+0x0000000000000008
[-- Attachment #2: module.patch --]
[-- Type: text/x-diff, Size: 455 bytes --]
diff --git a/arch/parisc/kernel/module.c b/arch/parisc/kernel/module.c
index b9d75d9..f3bfd6a 100644
--- a/arch/parisc/kernel/module.c
+++ b/arch/parisc/kernel/module.c
@@ -660,6 +660,10 @@ int apply_relocate_add(Elf_Shdr *sechdrs,
}
*loc = (*loc & ~0x3ff1ffd) | reassemble_22(val);
break;
+ case R_PARISC_PCREL32:
+ val -= (uint32_t) loc;
+ *loc = val;
+ break;
default:
printk(KERN_ERR "module %s: Unknown relocation: %u\n",
next prev parent reply other threads:[~2016-04-05 18:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-05 17:31 kernel 4.6-rc unbootable due to module changes Mikulas Patocka
2016-04-05 17:36 ` Mikulas Patocka
2016-04-05 18:54 ` Helge Deller [this message]
2016-04-05 20:15 ` Mikulas Patocka
2016-04-06 14:30 ` Mikulas Patocka
2016-04-06 21:44 ` Helge Deller
2016-04-07 22:48 ` Helge Deller
2016-04-08 12:06 ` Aw: " Helge Deller
2016-04-08 14:59 ` Helge Deller
2016-04-08 19:43 ` Helge Deller
2016-04-05 20:18 ` John David Anglin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=570409DA.1060508@gmx.de \
--to=deller@gmx.de \
--cc=linux-parisc@vger.kernel.org \
--cc=mpatocka@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.