Thread (51 messages) 51 messages, 6 authors, 2012-04-16

Re: [RFC PATCH 17/17] KVM: PPC: Add an ioctl for userspace to select which platform to emulate

flat view

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2011-06-30 23:13:24
Also in: kvm

Regarding that.  There's another option - the ioctl code embeds the 
structure size.  So if we extend the ioctl parsing to pad up (or 
truncate down) from the user's size to our size, and similarly in the 
other direction, we can get away from this ugliness.
I don't like relying on that much ... I prefer having an explicit
version in the structure head (or use a flag).
Some years ago I posted a generic helper that did this (and also 
kmalloc'ed and kfree'd the data itself), but it wasn't received 
favourably.  Maybe I should try again (and we can possibly use it in kvm 
even if it is rejected for general use, though that's against our 
principles of pushing all generic infrastructure to the wider kernel).
Cheers,
Ben.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help