From: "Michael Kerrisk" <mtk.manpages@googlemail.com>
To: "Andrew Morton" <akpm@linux-foundation.org>
Cc: roland@redhat.com, torvalds@linux-foundation.org,
linux-kernel@vger.kernel.org, drepper@redhat.com,
vegard.nossum@gmail.com, linux-man@vger.kernel.org,
stable@kernel.org
Subject: Re: [PATCH] sys_waitid: return -EFAULT for NULL
Date: Wed, 14 Jan 2009 12:36:44 +1300 [thread overview]
Message-ID: <cfd18e0f0901131536v30d01881uec31e08000be883c@mail.gmail.com> (raw)
In-Reply-To: <20090113152457.0d7685ad.akpm@linux-foundation.org>
On Wed, Jan 14, 2009 at 12:24 PM, Andrew Morton
<akpm@linux-foundation.org> wrote:
> On Wed, 14 Jan 2009 12:14:20 +1300
> "Michael Kerrisk" <mtk.manpages@googlemail.com> wrote:
>
>> On Wed, Jan 14, 2009 at 11:49 AM, Roland McGrath <roland@redhat.com> wrote:
>> > It's always been invalid to call waitid() with a NULL pointer. It was an
>> > oversight that it was allowed (and acts like a wait4() call instead).
>> >
>> > Signed-off-by: Roland McGrath <roland@redhat.com>
>>
>> Modulo the observation that this change will break any Linux-specific
>> application that violate POSIX.1's requirement that infop not be NULL
>> (*), and rely on the existing Linux behavior for
>> waitd(idtype,id,NULL,options):
>>
>
> Well yes. waitid() has been in there since 2.6.9. I assume that it
> has had this wait4-emulation mode for that amount of time as well?
AFIACS, yes.
>> (*) It seems unlikely that such applications exist, and we really
>> should make this change for POSIX.1 conformance.
>
> Well, we might get away with it. But formally speaking, we should live
> with our Linux-specific screwup.
Yes, tricky. On the one hand, we shouldn't break the ABI. On the
other hand, POSIX.1 is explicit in disallowing the case that would
lead the ABI change made by this patch. (For what it is worth, the
man page was released at pretty much the same time as the syscall, and
has always documented that the return value on success was 0, and
Vegard was the first person to report this case that deviated from the
doc.)
> If we _are_ going to make this change then we should merge it as far
> back in -stable as we can, to reduce the risk that people will develop
> applications on kernel version A only to have then behave differently
> on version B.
Ack.
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
git://git.kernel.org/pub/scm/docs/man-pages/man-pages.git
man-pages online: http://www.kernel.org/doc/man-pages/online_pages.html
Found a bug? http://www.kernel.org/doc/man-pages/reporting_bugs.html
next prev parent reply other threads:[~2009-01-13 23:36 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cfd18e0f0901131436ud2cf61bkf0e6b00f4b765bb5@mail.gmail.com>
2009-01-13 22:38 ` waitid() return value strangeness when infop is NULL Michael Kerrisk
2009-01-13 22:43 ` Michael Kerrisk
2009-01-13 22:47 ` Roland McGrath
2009-01-13 22:49 ` [PATCH] sys_waitid: return -EFAULT for NULL Roland McGrath
2009-01-13 23:14 ` Michael Kerrisk
2009-01-13 23:24 ` Andrew Morton
2009-01-13 23:36 ` Michael Kerrisk [this message]
2009-01-13 23:47 ` Roland McGrath
2009-01-14 0:13 ` Michael Kerrisk
2009-01-14 0:24 ` Ulrich Drepper
2009-01-14 0:33 ` Linus Torvalds
2009-01-14 0:53 ` Michael Kerrisk
2009-01-14 0:57 ` Linus Torvalds
2009-01-14 1:39 ` Michael Kerrisk
2009-01-14 2:10 ` Linus Torvalds
2009-01-14 2:28 ` Michael Kerrisk
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=cfd18e0f0901131536v30d01881uec31e08000be883c@mail.gmail.com \
--to=mtk.manpages@googlemail.com \
--cc=akpm@linux-foundation.org \
--cc=drepper@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-man@vger.kernel.org \
--cc=mtk.manpages@gmail.com \
--cc=roland@redhat.com \
--cc=stable@kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=vegard.nossum@gmail.com \
/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
all inboxes | Powered by JetHome®