Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752911AbdDLHqU (ORCPT ); Wed, 12 Apr 2017 03:46:20 -0400 Received: from mail.orcon.net.nz ([219.88.242.59]:34502 "EHLO mail.orcon.net.nz" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751212AbdDLHqQ (ORCPT ); Wed, 12 Apr 2017 03:46:16 -0400 X-Greylist: delayed 556 seconds by postgrey-1.27 at vger.kernel.org; Wed, 12 Apr 2017 03:46:16 EDT Date: Wed, 12 Apr 2017 19:36:36 +1200 From: Michael Cree To: Helge Deller Cc: Bob Tracy , debian-alpha@lists.debian.org, linux-kernel@vger.kernel.org Subject: Re: [BUG] alpha: module xxx: Unknown relocation: 1 Message-ID: <20170412073636.aak7onwt7b4furve@tower> Mail-Followup-To: Michael Cree , Helge Deller , Bob Tracy , debian-alpha@lists.debian.org, linux-kernel@vger.kernel.org References: <20170410004755.GA22356@gherkin.frus.com> <20170410094250.gxcne7imso4u2vjx@tower> <20170411034242.GA27395@gherkin.frus.com> <20170411061232.bchlfc73lqx2z2cy@tower> <20170411215716.GA29795@gherkin.frus.com> <20170412025935.GA10065@gherkin.frus.com> <127df124-4000-d473-148a-8de03cc48cc9@gmx.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="cjg6ftbbpgmbszj6" Content-Disposition: inline In-Reply-To: <127df124-4000-d473-148a-8de03cc48cc9@gmx.de> User-Agent: NeoMutt/20170113 (1.7.2) X-Bayes-Prob: 0.0001 (Score 0: No Bayes scoring rules defined, tokens from: outbound) X-Spam-Score: -1.72 () [Hold at 3.00] FREEMAIL_FROM:0.001,FSL_HELO_NON_FQDN_1:0.001,HELO_NO_DOMAIN:0.001,RDNS_NONE:1.274,CC(NZ:-3) X-CanIt-Geo: ip=121.99.228.40; country=NZ; latitude=-41.0000; longitude=174.0000; http://maps.google.com/maps?q=-41.0000,174.0000&z=6 X-CanItPRO-Stream: base:outbound X-Canit-Stats-ID: 02T7jABR2 - 53a5f6e3c519 - 20170412 (trained as not-spam) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1783 Lines: 52 --cjg6ftbbpgmbszj6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Apr 12, 2017 at 07:57:52AM +0200, Helge Deller wrote: > On 12.04.2017 04:59, Bob Tracy wrote: > > Bottom line is, no kernel I've built since 4.9 can load a module. All > > attempts to load a module result in the error message emitted by > > "arch/alpha/kernel/module.c" as follows: > > > > module XXX: Unknown relocation: 1 > > > > I assume it's due this commmit "modversions: treat symbol CRCs as 32 bit quantities": > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=71810db27c1c853b335675bee335d893bc3d324b > > For parisc this patch solves it: > parisc: support R_PARISC_SECREL32 relocation in modules > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5f655322b1ba4bd46e26e307d04098f9c84df764 > > > module XXX: Unknown relocation: 1 > > For alpha it seems you need to add similar code to handle R_ALPHA_REFLONG > to apply_relocate_add() in arch/alpha/kernel/module.c Would the attached patch fix it? Untested because I don't see the above issue. Cheers Michael. --cjg6ftbbpgmbszj6 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="alpha-fix-missing-reflong.patch" diff --git a/arch/alpha/kernel/module.c b/arch/alpha/kernel/module.c index 936bc8f89a67..47632fa8c24e 100644 --- a/arch/alpha/kernel/module.c +++ b/arch/alpha/kernel/module.c @@ -181,6 +181,9 @@ apply_relocate_add(Elf64_Shdr *sechdrs, const char *strtab, switch (r_type) { case R_ALPHA_NONE: break; + case R_ALPHA_REFLONG: + *(u32 *)location = value; + break; case R_ALPHA_REFQUAD: /* BUG() can produce misaligned relocations. */ ((u32 *)location)[0] = value; --cjg6ftbbpgmbszj6--