On Wed, 11 Aug 2010 22:06:08 -0700 "H. Peter Anvin" <hpa@zytor.com> wrote:
Well, anyone who does get_user() on a struct while expecting it to be
atomic gets to own both pieces. I think the problem here is
specifically u64/s64. These work on 64-bit but don't work on 32-bit.
Is the atomicity really a problem? If userspace updates the 64-bit
number while the kernel is copying it, the kernel gets a garbage
number. But so what? Userspace can feed the kernel garbage numbers in
lots of ways, and the kernel must be able to cope with it
appropriately.
<I suspect you can do get_user() on a 4-byte or 8-byte struct right now
and it'll work>
--