From: Samuel Thibault <samuel.thibault@gnu.org>
To: Jessica Clarke <jrtc27@jrtc27.com>
Cc: "Ludovic Courtès" <ludo@gnu.org>,
libc-alpha@sourceware.org, bug-hurd@gnu.org,
"Jan Nieuwenhuizen" <janneke@gnu.org>
Subject: Re: [PATCH] hurd: '_hurd_raise_signal' checks signal number is valid
Date: Wed, 14 Oct 2020 12:43:10 +0200 [thread overview]
Message-ID: <20201014104310.7ixwjyz3xamde3g6@function> (raw)
In-Reply-To: <ABF42DD0-CC61-468A-8CB2-8A4CBA328177@jrtc27.com>
Hello,
Jessica Clarke, le mar. 13 oct. 2020 22:20:15 +0100, a ecrit:
> On 13 Oct 2020, at 22:16, Ludovic Courtès <ludo@gnu.org> wrote:
> > Previously, 'pthread_kill (pthread_self (), -1)' would wrongfully
> > succeed:
> >
> > https://lists.gnu.org/archive/html/guix-devel/2020-10/msg00152.html
> > --- a/hurd/hurd-raise.c
> > +++ b/hurd/hurd-raise.c
> > @@ -28,6 +28,9 @@ int
> > _hurd_raise_signal (struct hurd_sigstate *ss,
> > int signo, const struct hurd_signal_detail *detail)
> > {
> > + if (signo < 1 || signo >= _NSIG)
> > + return EINVAL;
> > +
>
> From pthread_kill(3):
>
> If sig is 0, then no signal is sent, but error checking is still performed.
>
> I interpret that as meaning it validates thread but ignores sig.
__pthread_kill actually already check for sig == 0, _hurd_raise_signal
is really not supposed to be called with sig == 0.
But thanks for making sure we don't miss that case :)
Samuel
next prev parent reply other threads:[~2020-10-14 10:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20201013135744.mpizainhz43e5vkl@function>
2020-10-13 21:16 ` Ludovic Courtès
2020-10-13 21:20 ` Jessica Clarke
2020-10-14 10:43 ` Samuel Thibault [this message]
2020-10-14 10:54 ` Andreas Schwab
2020-10-14 16:55 ` Ludovic Courtès
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=20201014104310.7ixwjyz3xamde3g6@function \
--to=samuel.thibault@gnu.org \
--cc=bug-hurd@gnu.org \
--cc=janneke@gnu.org \
--cc=jrtc27@jrtc27.com \
--cc=libc-alpha@sourceware.org \
--cc=ludo@gnu.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).