From: "Peter T. Breuer" <ptb@it.uc3m.es>
To: "linux kernel" <linux-kernel@vger.kernel.org>
Subject: share buffer between user and kernel?
Date: Tue, 9 Oct 2001 09:03:35 +0200 (MET DST) [thread overview]
Message-ID: <200110090703.f9973Z601609@oboe.it.uc3m.es> (raw)
What is the currently approved method of sharing a buffer between
userspace and kernelspace, so that I can avoid one or two
copy_to/from_user?
It used to be that one reimplemented mmap to provide the kernel
with some vmalloced memory which one went through reserving, then
the mmap interface automagically provided the right address to
userspace. I get the impression that there are nowadays much
slicker and cleaner ways to do this ... but searching the code
for examples of the absence of copy_to_user is, errm, difficult.
The sound drivers seem to play around in this area, but they
are mapping real physical memory, which I don't want. Is there
an example which uses vmalloced memory?
Or should I just be making a buffer in userspace, then passing
the address to the kernel, then locking it somehow, then collapsing
it to a kernel address? It's going to be about 256K at most.
Suggestions very gratefully received!
Peter
next reply other threads:[~2001-10-09 7:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-09 7:03 Peter T. Breuer [this message]
2001-10-15 16:12 ` Tommy Reynolds
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=200110090703.f9973Z601609@oboe.it.uc3m.es \
--to=ptb@it.uc3m.es \
--cc=linux-kernel@vger.kernel.org \
/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®