Messages in this thread |  | | | Subject | Re: BUG: mmapfile/writev spurious zero bytes (x86_64/not i386, bisected, reproducable) | | From | Andi Kleen <> | | Date | Tue, 17 Jun 2008 22:58:17 +0200 | |
Linus Torvalds <torvalds@linux-foundation.org> writes:
>
> So I'm starting to think the bug is all in there, not in the VM itself.
> See arch/x86/lib/copy_user_nocache.S.
The x86-64 copy_*_user functions were always designed to return errors
both ways (as in both for load and for store). That's needed because
the loops are shared for copy_to_user and copy_from_user. That's normally
ok because when you do _to_user you shouldn't fault on the loads
and vice versa. If a caller does that it's buggy.
-Andi
|  |