public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@digeo.com>
To: Russell King <rmk@arm.linux.org.uk>
Cc: linux-kernel@vger.kernel.org
Subject: Re: vmalloc/module_alloc: unable to handle two memory regions
Date: Fri, 31 Jan 2003 13:04:32 -0800	[thread overview]
Message-ID: <20030131130432.6631ff1e.akpm@digeo.com> (raw)
In-Reply-To: <20030131105518.B19646@flint.arm.linux.org.uk>

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?



      reply	other threads:[~2003-01-31 20:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-31 10:20 vmalloc/module_alloc: unable to handle two memory regions Russell King
     [not found] ` <20030131024820.4c1290ca.akpm@digeo.com>
2003-01-31 10:55   ` Russell King
2003-01-31 21:04     ` Andrew Morton [this message]

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=20030131130432.6631ff1e.akpm@digeo.com \
    --to=akpm@digeo.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk@arm.linux.org.uk \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox