From: Avery Pennarun <apenwarr@nit.ca>
To: Keir Fraser <Keir.Fraser@cl.cam.ac.uk>
Cc: David Becker <becker@cs.duke.edu>, xen-devel@lists.sourceforge.net
Subject: Re: perl hypervisor interface
Date: Fri, 9 Jul 2004 12:18:00 -0400 [thread overview]
Message-ID: <20040709161800.GL2502@worldvisions.ca> (raw)
In-Reply-To: <E1BixpU-00044C-00@mta1.cl.cam.ac.uk>
On Fri, Jul 09, 2004 at 05:02:27PM +0100, Keir Fraser wrote:
> > One bit I left out from the libxc do_dom0_op() procedure, was calling mlock()
> > on the dom0_op struct before passing it into the ioctl().
> > When does the mlock() come into play?
>
> Xen doesn't do paging, so any memory buffers you pass to the dom0_op
> hypercall (including the dom0_op_t structure itself) must be resident
> when Xen is entered. If the buffer is allocated in-kernel then this
> isn't a problem, as Linux doesn't page itself. In user space we must
> use mlock() to force the buffer to be resident.
Wouldn't it be better to have the ioctl() auto-mlock() the memory area,
rather than trusting userspace apps to know what they're doing? In general,
calls from userspace shouldn't be able to *accidentally* crash the kernel...
at least not without asking the kernel for permission first :)
Have fun,
Avery
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
next prev parent reply other threads:[~2004-07-09 16:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-09 15:30 perl hypervisor interface David Becker
2004-07-09 16:02 ` Keir Fraser
2004-07-09 16:18 ` Avery Pennarun [this message]
2004-07-09 18:32 ` Keir Fraser
2004-07-09 16:02 ` Mark Williamson
2004-07-09 16:05 ` Keir Fraser
2004-07-09 20:33 ` ron minnich
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=20040709161800.GL2502@worldvisions.ca \
--to=apenwarr@nit.ca \
--cc=Keir.Fraser@cl.cam.ac.uk \
--cc=becker@cs.duke.edu \
--cc=xen-devel@lists.sourceforge.net \
/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.