From: torvalds@transmeta.com (Linus Torvalds)
To: linux-kernel@vger.kernel.org
Subject: Re: 2.2 PATCH: check return from copy_*_user in fs/pipe.c
Date: 19 Jun 2001 22:14:19 -0700 [thread overview]
Message-ID: <9gpbfb$vlu$1@cesium.transmeta.com> (raw)
In-Reply-To: <15152.4073.812901.656882@pizda.ninka.net> <20010619205924.H5679@stanford.edu>
In article <20010619205924.H5679@stanford.edu>,
Zack Weinberg <zackw@Stanford.EDU> wrote:
>On Tue, Jun 19, 2001 at 07:52:25PM -0700, David S. Miller wrote:
>>
>> Zack Weinberg writes:
>> > It *has* been fixed in 2.4, though. Some sort of compatibility issue?
>>
>> No, some kind of "it doesn't matter" issue.
>
>I can demonstrate user code that behaves differently under 2.2 than
>2.4. The example I have (appended) doesn't suffer data loss, but I
>bet I could make one that did.
Hey, I can demonstrate user code that behaves differently depending on
what compiler options were used etc.
Hint: "undefined behaviour".
If somebody passes in a bad pointer to a system call, you've just
invoced the rule of "the kernel _may_ be nice to you, but the kernel
might just consider you a moron and tell you it worked".
There is no "lost data" or anything else. You've screwed yourself, and
you threw the data away. Don't blame the kernel.
And before you say "it has to return EFAULT", check the standards, and
think about the case of libraries vs system calls - and how do you tell
them apart?
Linus
next prev parent reply other threads:[~2001-06-20 5:15 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-06-20 2:08 2.2 PATCH: check return from copy_*_user in fs/pipe.c Zack Weinberg
2001-06-20 2:16 ` David S. Miller
2001-06-20 2:48 ` Zack Weinberg
2001-06-20 2:52 ` David S. Miller
2001-06-20 3:59 ` Zack Weinberg
2001-06-20 4:01 ` David S. Miller
2001-06-20 5:14 ` Linus Torvalds [this message]
2001-06-20 4:33 ` Andrew Tridgell
2001-06-20 15:52 ` Hugh Dickins
-- strict thread matches above, loose matches on Subject: below --
2001-06-21 3:26 Zack Weinberg
2001-06-21 3:44 ` David S. Miller
2001-06-21 6:10 ` Zack Weinberg
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='9gpbfb$vlu$1@cesium.transmeta.com' \
--to=torvalds@transmeta.com \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox