Re: [RFC] fixing the UML failure root cause
From: Linus Torvalds
Date: Thu Oct 13 2011 - 02:19:39 EST
On Wed, Oct 12, 2011 at 5:24 AM, Andrew Lutomirski <luto@xxxxxxx> wrote:
>
> So here's a different approach. It's not perfect: it always blames
> SEGV_MAPERR instead of SEGV_ACCERR. I implemented it for vgettimeofday
> but not the other two vsyscalls.
>
> What do you think of this approach? If it seems good, I'll finish the
> patch and submit it.
I think the approach is valid, but you should *not* do this as some
kind of crazy byte-by-byte copy_to_user() emulation.
Do the "copy tz to user mode" as individual "put_user()" calls for
tv_sec/tv_usec/timezone. IOW, there are three words being written to
user mode, not "two memcpy's".
Other than that, there doesn't seem to be anything wrong.
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/