Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp850666rdb; Fri, 9 Feb 2024 03:11:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IGV1yI3Kqy9028Rd4jP0ay3uKAijfMMeaJL9mSaRpuSRWAYEmxEcxwcjMFqhZ5D0rqAOIuR X-Received: by 2002:a05:6a21:1584:b0:19a:4935:458 with SMTP id nr4-20020a056a21158400b0019a49350458mr1577240pzb.35.1707477117130; Fri, 09 Feb 2024 03:11:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707477117; cv=pass; d=google.com; s=arc-20160816; b=zmWBYEEPcRBC8e4jj22FfwUFIwENxXB270wpCaRDej1DD3TEPnva4VQ9QhK6cb8v4B 2Du8TTxWbbfNi0h7149XtROGbIIOFR4yNS3o8jtjF10nmE1wsoKZxPKPQu3CNO0EHbM5 jKBNOCJIUZYtSUbNFatE2UTXjIs/HKOZaOoH0DUXPipTqgW2Ez61QkIKL097UaBGI9C4 FxEkvl5916tsP1m60nTNFPs1Qj20oWCT2TbchuLjOOxPkEkPdRTR6vWRK2S7rImXzqep FxE1zCmLCqicma3+jeYR+gfGg0VyxOxDAihLF3c1OdApLrR324RLULP+Ah7xttnRp+jb I7GQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=ZMAPlkEOykUikv1rtlx9+4EfL9AWEUsHnCPiEO7N96Q=; fh=n3fgXl/zMGREijcP0T4Z7We+B+KH/f0b/4bCT8BhQxQ=; b=vi0KfqUreCRLtCyCPp3QQGEsn3R//1uH+goIlDz0v530+zrybB0l45Y0R6yMQuQZZc hNag3xjzUUnzwWJntKuhHzaShw4wvH9yNlfkBOGmCBbdFsA+pSIUkUoO/H17xvWgXbCT lv5JBNW/DeOmVZIogQUitHbwu3EeTqZw+E0fxIVfpDHfaRIV8+L1dChr2cfrTCwTt5ux KmV88iCqA4m93tLfbkacaYpZ0orLy9KJBm4WNO0GYntbNtW37tgNH1FJ9BsvmG3tVik+ y5Av9n49W/ObjD6gWbcAMJp3IoxBkw0Wj8qO/QRoKIG9W1QLsEAhnDyorCZup6OQAjLV 0pDg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=cuQLrUlr; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-59252-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59252-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com X-Forwarded-Encrypted: i=2; AJvYcCVRD0jAu9rwPBTcvBtlGrp/0wOoFEVdw2GZXQFCkyYa/0NYF8dMQj0ydFhLYMCWDgyl0N8E7EA5OeUVzZthgeIFZ662eBw5SjoYNeNKig== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id n17-20020a637211000000b005cdfd6f30a0si1529894pgc.748.2024.02.09.03.11.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 03:11:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-59252-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=cuQLrUlr; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-59252-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59252-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id F33C5B22932 for ; Fri, 9 Feb 2024 10:55:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E3B022562C; Fri, 9 Feb 2024 10:55:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="cuQLrUlr" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 422E225614 for ; Fri, 9 Feb 2024 10:55:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707476118; cv=none; b=YLaJIfR4qOglI09kltc+teM7V3oI8A5vBpAGbjEDp5CZqfMrNpPh5Gtol1fltAQEhXxZHClpVwWy5AB5btPQHzNabYzF0vShEDVSUqhjOmzK38hwOWXf5nOoJFTdhtNK/cokx2wCKv0XbXzbTRsv+7eoXfxMbGGkWkyyRc2vdU0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707476118; c=relaxed/simple; bh=PuoJ7FAF6sK9oT75e0IAxDQhewqKsNVGGVSNtkERdh8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=mdiAPrEeY20EQpKZC8lZJrp7An35co2oty9Og+9vz0l/JLmJNDkt0pnCoFiCxHfXWn2f/Xgc6pSMwWTXjOeq+j8k0OMP+0Qlf1VVuoEKsRJgABTpeu1lhDx/VSKoE/+PCWctnpy9hHYFJBRJVjNsV2kshD0NkLgEMssWsBlKtFg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=cuQLrUlr; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1707476114; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ZMAPlkEOykUikv1rtlx9+4EfL9AWEUsHnCPiEO7N96Q=; b=cuQLrUlrb9kuQbIjc8NwoKXl1lg+7ad9hlxfwwd6lAmwVO5OsThrBaG2RHyqMTkfmiYI6a PFuh+6j+HJRcRNaUeinOEbpGdBsB1L0Zfi0sRHLK0xCzJzslAYgExz6zywXnT7HBNzlL2w uyqRvVjP8Fx5uVQQNMXJaX/PoZRfwBM= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-223-HLskda55OjePR3B4iQ8_IA-1; Fri, 09 Feb 2024 05:55:11 -0500 X-MC-Unique: HLskda55OjePR3B4iQ8_IA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B43DC85A58B; Fri, 9 Feb 2024 10:55:10 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.45.226.84]) by smtp.corp.redhat.com (Postfix) with SMTP id 4629C8BCC; Fri, 9 Feb 2024 10:55:09 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Fri, 9 Feb 2024 11:53:54 +0100 (CET) Date: Fri, 9 Feb 2024 11:53:52 +0100 From: Oleg Nesterov To: Christian Brauner Cc: "Eric W. Biederman" , Andy Lutomirski , Tycho Andersen , linux-api@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] pidfd: change pidfd_send_signal() to respect PIDFD_THREAD Message-ID: <20240209105351.GB3282@redhat.com> References: <20240207114549.GA12697@redhat.com> <8734u32co5.fsf@email.froward.int.ebiederm.org> <20240208155731.GH19801@redhat.com> <20240209-postfach-notorisch-f8443677b490@brauner> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240209-postfach-notorisch-f8443677b490@brauner> User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 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)