[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] Re: [RFC] [PATCH] sysfs support for Xen attributes

On Thu, Jan 12, 2006 at 12:53:40PM -0600, Anthony Liguori wrote:
> Greg KH wrote:
> >What exactly do the different ioctls do?  Do they have to be ioctls?
> >Can you use configfs or sysfs for most of the stuff there?
> > 
> >
> The canonical example is /proc/xen/privcmd which is our userspace 
> hypercall interface.  A hypercall is software interrupt with a number of 
> parameters passed via registers.  This has to come from ring 1 for 
> security reasons (the kernel is running in ring 1).
> We wish to make management hypercalls as the root user in userspace 
> which means we have to go through the kernel.  Currently, we do this by 
> having /proc/xen/privcmd accept an ioctl() that takes a structure that 
> describe the register arguments.  The kernel interface allows us to 
> control who in userspace can execute hypercalls.
> It would perhaps be possible to use a read/write interface for 
> hypercalls but ioctl() seems a little less awkward.  Suggestions are 
> certainly appreciated though.
> Right now, I think a misc char device with an ioctl() interface seems 
> like the most promising way to do this.  This doesn't seem like the sort 
> of think one would want to expose in sysfs...

ick ick ick.

Why not do the same thing that the Cell developers did for their
"special syscalls"?  Or at the least, make it a "real" syscall like the
ppc64 developers did.  It's not like there isn't a whole bunch of "prior
art" in the kernel today that you should be ignoring.

Please don't abuse /proc with ioctls like that.

And if you tried to do that with sysfs...


greg k-h

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.