From: Andi Kleen <andi@firstfloor.org>
To: torvalds@linux-foundation.org
Cc: linux-kernel@vger.kernel.org
Subject: copy_from_user again()
Date: Wed, 18 Jun 2008 00:19:03 +0200 [thread overview]
Message-ID: <87hcbrwvqg.fsf@basil.nowhere.org> (raw)
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
next reply other threads:[~2008-06-17 22:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-17 22:19 Andi Kleen [this message]
2008-06-17 23:41 ` copy_from_user again() Linus Torvalds
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87hcbrwvqg.fsf@basil.nowhere.org \
--to=andi@firstfloor.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.