Re: mmap inside kernel memory.

From: Jerome de Vivie (
Date: Sat Feb 08 2003 - 20:50:55 EST

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:

do_mmap(file ,kvaddr ,len ,PROT_READ|PROT_WRITE ,MAP_FIXED|MAP_PRIVATE

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Úr˘me de Vivie
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Sat Feb 15 2003 - 22:00:20 EST