Re: [BUG] alpha: module xxx: Unknown relocation: 1

2017-04-11 Thread Helge Deller
On 12.04.2017 04:59, Bob Tracy wrote:
> (Adding linux-kernel to the distribution.  The issue seems to be
> architecture-specific, but I'm trying to understand what broke.)
> 
> The 4.10-rc1 patch set made fairly extensive modifications to
> "a/kernel/module.c" (I'm leaving the "a" there so there's no doubt I
> mean the top-level "kernel/module.c" file and not any of the
> architecture-specific ones).
> 
> One of the changes was to replace an include of  with
> .  This is potentially significant because of the
> mod we made to alpha's  to fix the BRSGP relocation
> error on __copy_user() issue.
> 
> 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'll start attempting to revert the recent module patches to see if that
> helps.  If anyone reading this knows what's happening, feel free to
> weigh-in before I spend too much time rebuilding kernels on a slow
> machine.

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

Helge



[BUG] alpha: module xxx: Unknown relocation: 1

2017-04-11 Thread Bob Tracy
(Adding linux-kernel to the distribution.  The issue seems to be
architecture-specific, but I'm trying to understand what broke.)

The 4.10-rc1 patch set made fairly extensive modifications to
"a/kernel/module.c" (I'm leaving the "a" there so there's no doubt I
mean the top-level "kernel/module.c" file and not any of the
architecture-specific ones).

One of the changes was to replace an include of  with
.  This is potentially significant because of the
mod we made to alpha's  to fix the BRSGP relocation
error on __copy_user() issue.

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'll start attempting to revert the recent module patches to see if that
helps.  If anyone reading this knows what's happening, feel free to
weigh-in before I spend too much time rebuilding kernels on a slow
machine.

--Bob



Re: current toolchain on Alpha is crap?

2017-04-11 Thread Bob Tracy
On Tue, Apr 11, 2017 at 06:12:32PM +1200, Michael Cree wrote:
> > > commit e811f8794673153858eac86448d827002e50ac0a
> > > Author: Michael Cree 
> > > Date:   Wed Feb 8 13:49:02 2017 +1300
> > > 
> > > alpha: fix link errors in user_copy().
> > 
> > Missed both the above.
> 
> This one attached.  It might help with your relocation problems.

Ah...  I recognize this one as part of the "alphalib" patch set.
Already applied.

--Bob