From: ebiederm@xmission.com (Eric W. Biederman)
To: "Joshua Hudson" <joshudson@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: wait4/waitpid/waitid oddness
Date: Fri, 07 Apr 2006 13:19:41 -0600 [thread overview]
Message-ID: <m1fykpmbw2.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <bda6d13a0604071158x33080de3ya8016dde59c2d97f@mail.gmail.com> (Joshua Hudson's message of "Fri, 7 Apr 2006 11:58:40 -0700")
"Joshua Hudson" <joshudson@gmail.com> writes:
> On 4/7/06, Eric W. Biederman <ebiederm@xmission.com> wrote:
>> "Albert Cahalan" <acahalan@gmail.com> writes:
>>
>> > The kernel prohibits:
>> >
>> > 1. WNOHANG on waitpid/wait4
>>
>> Not 2.6.17-rc1, and not for a lot of earlier kernels.
>> At least not on ingress, and just skimming the code
>> I can't see any deeper checks that would prevent this.
>>
>> > 2. __WALL on waitid
>> >
>> > Why? I need both at once.
>>
>> Which kernel is failing, and how?
>
> LKNL 2.6.16.1 has this check. Haven't checked any others.
So what I see current in wait4 is:
> asmlinkage long sys_wait4(pid_t pid, int __user *stat_addr,
> int options, struct rusage __user *ru)
> {
> long ret;
>
> if (options & ~(WNOHANG|WUNTRACED|WCONTINUED|
> __WNOTHREAD|__WCLONE|__WALL))
> return -EINVAL;
This denies access if you use other flags but it should allow
__WALL and WNOHANG together. I didn't see anything in do_wait,
that would prohibit this.
> ret = do_wait(pid, options | WEXITED, NULL, stat_addr, ru);
>
> /* avoid REGPARM breakage on x86: */
> prevent_tail_call(ret);
> return ret;
> }
So where are you seeing the check in 2.6.16.1?
Eric
next prev parent reply other threads:[~2006-04-07 19:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-06 3:38 wait4/waitpid/waitid oddness Albert Cahalan
2006-04-07 2:09 ` Joshua Hudson
2006-04-07 5:38 ` Kyle Moffett
2006-04-07 6:40 ` Joshua Hudson
2006-04-07 6:50 ` Neil Brown
2006-04-07 7:09 ` Joshua Hudson
2006-04-07 18:23 ` Eric W. Biederman
2006-04-07 18:58 ` Joshua Hudson
2006-04-07 19:19 ` Eric W. Biederman [this message]
2006-04-07 19:24 ` Joshua Hudson
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=m1fykpmbw2.fsf@ebiederm.dsl.xmission.com \
--to=ebiederm@xmission.com \
--cc=joshudson@gmail.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 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.