All of lore.kernel.org
 help / color / mirror / Atom feed
* copy_from_user again()
@ 2008-06-17 22:19 Andi Kleen
  2008-06-17 23:41 ` Linus Torvalds
  0 siblings, 1 reply; 2+ messages in thread
From: Andi Kleen @ 2008-06-17 22:19 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel


Linus,

Just in case you read that:

I thought a little more about your patch. One problem I see (and that is why
I aborted my version of it too) is that it becomes very inaccurate now in reporting.

So for example when you have a source like

offset

0
4
8
<---> unmapped boundary

and it starts copying from 0-8 and faults then with your patch it will
return full size even though it could have copied 8 bytes (return size
- 8) That is what I meant by breaking it.  Arguably it's just a
different breakage.

IIRC mount was quite sensitive to that, as in it passed some data before
the a fault boundary and relies on that data getting through. It might
be lucky with the alignment or it might now.

So with your change the exception handler would also need to be fixed
to copy the non faulted part to the target.

-Andi


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-06-17 23:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-17 22:19 copy_from_user again() Andi Kleen
2008-06-17 23:41 ` Linus Torvalds

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.