From: Florian Weimer <fweimer@redhat.com>
To: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH v10 1/5] nptl: Add __raise_direct
Date: Thu, 09 Jul 2026 12:01:50 +0200 [thread overview]
Message-ID: <lhuo6gg1nxt.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <20260623124831.2165041-2-adhemerval.zanella@linaro.org> (Adhemerval Zanella's message of "Tue, 23 Jun 2026 09:47:42 -0300")
* Adhemerval Zanella:
> diff --git a/sysdeps/unix/sysv/linux/raise_direct.c b/sysdeps/unix/sysv/linux/raise_direct.c
> new file mode 100644
> index 00000000000..d38bd10817a
> --- /dev/null
> +++ b/sysdeps/unix/sysv/linux/raise_direct.c
> @@ -0,0 +1,29 @@
> +/* Internal function to send a signal to itself. Linux version.
> + Copyright (C) 2026 Free Software Foundation, Inc.
> + This file is part of the GNU C Library.
> +
> + The GNU C Library is free software; you can redistribute it and/or
> + modify it under the terms of the GNU Lesser General Public
> + License as published by the Free Software Foundation; either
> + version 2.1 of the License, or (at your option) any later version.
> +
> + The GNU C Library is distributed in the hope that it will be useful,
> + but WITHOUT ANY WARRANTY; without even the implied warranty of
> + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> + Lesser General Public License for more details.
> +
> + You should have received a copy of the GNU Lesser General Public
> + License along with the GNU C Library; if not, see
> + <https://www.gnu.org/licenses/>. */
> +
> +#include <sysdep.h>
> +#include <pthread.h>
> +#include <unistd.h>
> +
> +int
> +__raise_direct (int signo)
> +{
> + pid_t tid = INTERNAL_SYSCALL_CALL (gettid);
> + int ret = INTERNAL_SYSCALL_CALL (tkill, tid, signo);
> + return INTERNAL_SYSCALL_ERROR_P (ret) ? INTERNAL_SYSCALL_ERRNO (ret) : 0;
> +}
The comment about not using the cached TID from the TCB was lost.
I suggest to add this comment to the implementation here.
Is the change from tgkill to tkill safe from a seccomp filters
perspective? The manual page says: “Avoid using this system call.”
At the very least, you should mention this change in the commit message.
Thanks,
Florian
next prev parent reply other threads:[~2026-07-09 10:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-23 12:47 [PATCH v10 0/5] elf: Allow RPATH/RUNPATH for static-pie Adhemerval Zanella
2026-06-23 12:47 ` [PATCH v10 1/5] nptl: Add __raise_direct Adhemerval Zanella
2026-07-09 10:01 ` Florian Weimer [this message]
2026-07-09 12:46 ` Adhemerval Zanella Netto
2026-06-23 12:47 ` [PATCH v10 2/5] Use _dl_writev on __libc_message_impl Adhemerval Zanella
2026-06-23 12:47 ` [PATCH v10 3/5] Fix assert during static startup (BZ 33326) Adhemerval Zanella
2026-07-09 13:00 ` Florian Weimer
2026-06-23 12:47 ` [PATCH v10 4/5] elf: Allow RPATH/RUNPATH for static-pie " Adhemerval Zanella
2026-06-23 12:47 ` [PATCH v10 5/5] elf: Remove __chk_fail from dl-minimal.c Adhemerval Zanella
2026-07-09 10:03 ` Florian Weimer
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=lhuo6gg1nxt.fsf@oldenburg.str.redhat.com \
--to=fweimer@redhat.com \
--cc=adhemerval.zanella@linaro.org \
--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).