All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jerome de Vivie <jerome.devivie@free.fr>
To: Rik van Riel <riel@conectiva.com.br>
Cc: linux-kernel@vger.kernel.org
Subject: Re: mmap inside kernel memory.
Date: Sun, 09 Feb 2003 02:50:55 +0100	[thread overview]
Message-ID: <3E45B3FF.E687EF48@free.fr> (raw)
In-Reply-To: Pine.LNX.4.50L.0302082159460.12742-100000@imladris.surriel.com

Rik van Riel wrote:
> 
> On Sun, 9 Feb 2003, Jerome de Vivie wrote:
> 
> > "mmap" seems to be design for mapping file or device inside a process
> > memory. Is it possible to map a file into the kernel virtual memory ?
> 
> In theory yes (using vmalloc space), but you really don't want to.

Yes, it's very tricky ! I have (naïvly) try this:

vaddr=vmalloc(len);
do_mmap(file ,kvaddr ,len ,PROT_READ|PROT_WRITE ,MAP_FIXED|MAP_PRIVATE
,0);

Here, do_mmap check if the addresse match inside current process and
return me -ENOMEM. Are there others functions which i could use to
associate this file and a vmalloc'ed space ?


j.

-- 
Jérôme de Vivie

  reply	other threads:[~2003-02-09  0:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-09  0:58 mmap inside kernel memory Jerome de Vivie
2003-02-09  0:00 ` Rik van Riel
2003-02-09  1:50   ` Jerome de Vivie [this message]
2003-02-09  1:51     ` Rik van Riel
2003-02-09 13:43       ` Jerome de Vivie

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=3E45B3FF.E687EF48@free.fr \
    --to=jerome.devivie@free.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=riel@conectiva.com.br \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.