mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Stephen C. Tweedie" <sct@redhat.com>
To: Jeff Garzik <jgarzik@mandrakesoft.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.rutgers.edu>,
	Stephen Tweedie <sct@redhat.com>
Subject: Re: map_user_kiobuf question
Date: Mon, 8 Nov 1999 20:14:17 +0000 (GMT)	[thread overview]
Message-ID: <14375.12057.128547.565786@dukat.scot.redhat.com> (raw)
In-Reply-To: <382355AA.6B6C450C@mandrakesoft.com>

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/

           reply	other threads:[~1999-11-08 20:24 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <382355AA.6B6C450C@mandrakesoft.com>]

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=14375.12057.128547.565786@dukat.scot.redhat.com \
    --to=sct@redhat.com \
    --cc=jgarzik@mandrakesoft.com \
    --cc=linux-kernel@vger.rutgers.edu \
    /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

all inboxes | Powered by JetHome®