Rusty Russell | 1 Jan 2009 01:52
Picon
Gravatar

Re: [PATCH] parisc: fix module loading failure of large kernel modules (take 4)

On Thursday 01 January 2009 00:43:56 Helge Deller wrote:
> Rusty Russell wrote:
> > Not quite what I had in mind... let me show you:
> > ...
> > Otherwise I'd have called it "arch_module_extra_size()".
> 
> This would mean that I can increase the section size in the arch-specific function
> by returning a bigger value than sh_size.
> This would give me space at the end of the section, but not at the beginning 
> (which is what I need), as sh_entsize (the offset into memory) will stay the 
> same as before.

Ah, OK.  I assumed that extra room at the end was sufficient.

So I've taken your previous patch and renamed the function to
arch_mod_section_prepend().  If we decide not to kill those bad gcc versions,
I'll stick it in some other random file (lib/weak.c?  Blech...)

BTW, this is very late for this merge window.  I would have liked to see
this a month ago :(

Subject: module: fix module loading failure of large kernel modules for parisc
Date: Wed, 31 Dec 2008 12:31:18 +0100
From: Helge Deller <deller <at> gmx.de>

When creating the final layout of a kernel module in memory, allow the
module loader to reserve some additional memory in front of a given section.
This is currently only needed for the parisc port which needs to put the
stub entries there to fulfill the 17/22bit PCREL relocations with large
kernel modules like xfs.
(Continue reading)

Helge Deller | 1 Jan 2009 13:02
Picon
Picon

Re: [PATCH] parisc: fix module loading failure of large kernel modules (take 4)

Rusty Russell wrote:
> On Thursday 01 January 2009 00:43:56 Helge Deller wrote:
>> Rusty Russell wrote:
>>> Not quite what I had in mind... let me show you:
>>> ...
>>> Otherwise I'd have called it "arch_module_extra_size()".
>> This would mean that I can increase the section size in the arch-specific function
>> by returning a bigger value than sh_size.
>> This would give me space at the end of the section, but not at the beginning 
>> (which is what I need), as sh_entsize (the offset into memory) will stay the 
>> same as before.
> 
> Ah, OK.  I assumed that extra room at the end was sufficient.
> 
> So I've taken your previous patch and renamed the function to
> arch_mod_section_prepend().  

Thanks a lot !!!!
Patch below is ok and I'll adjust the parisc-specific patch
acordingly.

> If we decide not to kill those bad gcc versions,
> I'll stick it in some other random file (lib/weak.c?  Blech...)

Andrew has pulled in the patch from Adrian in his -mm tree, so we should
be safe now.

> BTW, this is very late for this merge window.  I would have liked to see
> this a month ago :(

(Continue reading)


Gmane