From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: Florian Weimer <fweimer@redhat.com>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH v4] Block all signals on timer_create thread (BZ#10815)
Date: Wed, 19 Feb 2020 11:08:35 -0300 [thread overview]
Message-ID: <74aaf1c4-ab96-16f1-ba4e-b849b7b6c9b8@linaro.org> (raw)
In-Reply-To: <87lfoydfwy.fsf@oldenburg2.str.redhat.com>
On 19/02/2020 07:34, Florian Weimer wrote:
> * Adhemerval Zanella:
>
>> diff --git a/nptl/tst-cancel28.c b/nptl/tst-cancel28.c
>> new file mode 100644
>> index 0000000000..f126dd8bcb
>> --- /dev/null
>> +++ b/nptl/tst-cancel28.c
>
>> +/* A stall in cancellation is a regression. */
>> +#define TIMEOUT 5
>> +#include <support/test-driver.c>
>
> I don't think we should reduce the test timeout below the default.
Ack.
>
>> diff --git a/rt/tst-timer-sigmask.c b/rt/tst-timer-sigmask.c
>> new file mode 100644
>> index 0000000000..1ed60e9d85
>> --- /dev/null
>> +++ b/rt/tst-timer-sigmask.c
>
>> +#ifdef __linux__
>> + /* POSIX timers threads created to handle SIGEV_THREAD block all
>> + signals except SIGKILL, SIGSTOP and glibc internals one except
>> + SIGTIMER. */
>> + if (!sigismember (&ss, sig)
>> + && (sig != SIGSETXID && sig != SIGCANCEL
>> + && sig != SIGKILL && sig != SIGSTOP))
>> + {
>> + thread_handler_failure = true;
>
> I think you can use TEST_VERIFY here. Then you won't need the
> thread_handler_failure variable.
Right, I changed to:
if (sigismember (&ss, sig))
TEST_VERIFY (sig != SIGSETXID && sig != SIGCANCEL
&& sig != SIGKILL && sig != SIGSTOP);
>
>> + }
>> +#endif
>
> Is __linux__ really the right conditional to check here?
I think we can use the following, since Hurd uses the default
pthread implementation that already blocks all signals as default
(and assuming Hurd also does not allow block SIGKILL and SIGSTOP):
/* POSIX timers threads created to handle SIGEV_THREAD block all
signals except SIGKILL, SIGSTOP and glibc internals ones. */
if (sigismember (&ss, sig))
{
TEST_VERIFY (sig != SIGKILL && sig != SIGSTOP);
TEST_VERIFY (!__is_internal_signal (sig));
}
>
> Rest of the patch looks okay.
>
> Thanks,
> Florian
>
prev parent reply other threads:[~2020-02-19 14:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-18 17:19 [PATCH v4] Block all signals on timer_create thread (BZ#10815) Adhemerval Zanella
2020-02-19 10:34 ` Florian Weimer
2020-02-19 14:08 ` Adhemerval Zanella [this message]
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
List information: https://www.gnu.org/software/libc/involved.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=74aaf1c4-ab96-16f1-ba4e-b849b7b6c9b8@linaro.org \
--to=adhemerval.zanella@linaro.org \
--cc=fweimer@redhat.com \
--cc=libc-alpha@sourceware.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).