lkml.org 
[lkml]   [2003]   [Jan]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: vmalloc/module_alloc: unable to handle two memory regions
Russell King <rmk@arm.linux.org.uk> wrote:
>
> On Fri, Jan 31, 2003 at 02:48:20AM -0800, Andrew Morton wrote:
> > Boggle.
> >
> > Isn't this totally abusing get_vma_area?
> >
> > What stops an ioremap region from landing in module space?
>
> Exactly the problem.
>
> What's more is that fs/proc/kcore.c:get_kcore_size() also breaks, so
> this isn't an acceptable solution. get_kcore_size wants the module
> region to be above PAGE_OFFSET.
>
> In order to place the module in the normal vmalloc space, we end up with
> a chicken and egg problem - we need to scan the module from kernel space
> to find out how large to make the jump table, but we can't because the
> module hasn't been loaded into kernel memory - this is the reason why it
> was suggested to go down this route.
>

Well, could you not do something like:

+----------------------------+ 4GB
devices
+----------------------------+ VMALLOC_END = 0xc2000000
vmalloc/ioremap
+----------------------------+ 0xc1000000 + sizeof(linux)
kernel direct-mapped ram
+----------------------------+ 0xc1000000
module
+----------------------------+ TASK_SIZE = MODULE_START = PAGE_OFFSET =
VMALLOC_START = 0xc0000000
user space
+----------------------------+

And then arrange for a (start=0xc1000000,len=sizeof(linux)) entry which
describes the kernel itself to be added to the vmlist before anything else?


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:32    [W:0.047 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site