lkml.org 
[lkml]   [1999]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: map_user_kiobuf question
Hi,

In article <382355AA.6B6C450C@mandrakesoft.com>, Jeff Garzik
<jgarzik@mandrakesoft.com> writes:

> What type of address gets passed to the third argument of
> map_user_kiobuf?

> can I do something like

> addr = vmalloc (size);
> ...
> map_user_kiobuf (xxx, iobuf, (unsigned long) addr, xxx);
> [ ... mess around with iobuf'd pages ... ]
> unmap_kiobuf (iobuf);

No --- and you wouldn't want to.

map_user_kiobuf() checks that the user has got permission to access the
requested pages, but vmalloc returns pages which are only visible from
kernel space.

The whole point about kiobufs is that they abstract away the mechanism
used to select the pages concerned. A consumer of kiobufs doesn't know
where the pages came from originally. If you want to populate the
kiobuf with kernel pages, you can do so: it's just a different kiobuf
populating function.

Thanks for raising this, though: I'll add virtual and physical page
mapping functions for kiobufs.

--Stephen


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

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