lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 9 Feb 2024 11:53:52 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: Christian Brauner <brauner@...nel.org>
Cc: "Eric W. Biederman" <ebiederm@...ssion.com>,
	Andy Lutomirski <luto@...capital.net>,
	Tycho Andersen <tycho@...ho.pizza>, linux-api@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] pidfd: change pidfd_send_signal() to respect PIDFD_THREAD

On 02/09, Christian Brauner wrote:
>
> On Thu, Feb 08, 2024 at 04:57:31PM +0100, Oleg Nesterov wrote:
> > On 02/08, Eric W. Biederman wrote:
> > >
> > > Because honestly right now using group_send_sig_info when
> > > the intended target of the signal is not the entire thread
> > > group is very confusing when reading your change.
> >
> > Agreed, so perhaps it makes sense to rename it later. See
>
> Agreed. The function seems misnamed and incorrectly documented. It just
> seems that it's never been used with PIDTYPE_PID but it's perfectly
> capable of doing that. So maybe just put a patch on top renaming it to
> send_sig_info_type() and remove the old comment. But I can live without
> renaming it for now as well.

OK, I'll update the comment, please see below.

It should probably say more about the case when type > PIDTYPE_TGID,
but this is "offtopic" for this patch.

Oleg.

--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -1437,7 +1437,8 @@ void lockdep_assert_task_sighand_held(struct task_struct *task)
 #endif
 
 /*
- * send signal info to all the members of a group
+ * send signal info to all the members of a thread group or to the
+ * individual thread if type == PIDTYPE_PID.
  */
 int group_send_sig_info(int sig, struct kernel_siginfo *info,
 			struct task_struct *p, enum pid_type type)


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ