Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp2340150rdb; Wed, 21 Feb 2024 04:57:01 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVdH+fA7Fuh6O58doI1sJ2qT7WC5ROrYryfGTPqFOFQLenWQ5wCxrtTEFdSh3uETy0X/lnXjhDa61ttqsRU4sSkdaTiJqQ2mFMHMZlspg== X-Google-Smtp-Source: AGHT+IEuahriRBonrMiX4tIBy3CfrVIx+OJ+uebNoJXxTcLjp+KTzYsHGOwK1IyppBLZfL8JAQjY X-Received: by 2002:a25:aaa5:0:b0:dc6:e622:f52 with SMTP id t34-20020a25aaa5000000b00dc6e6220f52mr17045075ybi.31.1708520220760; Wed, 21 Feb 2024 04:57:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708520220; cv=pass; d=google.com; s=arc-20160816; b=wvyzG1F5MLGXKJyhou93y92UrTIM3wAGwMUez6niIIlT+joNyPi+wkBOn2dJ2eflig RFtlGH8wgeF4/KD0xmef0deN24mPf/NHfipMaQLw6Vf9uAPj52EFsgiHAKPVwpr+jqS1 XVJvMnE40P0X5tILeWirTfJyif3s8foY8kloVS0zNGi7VRFu7yulBuN8F8iVMD5Vilmv lXYRRjiYNGJDK4fXMdqDyozJ6KO9Dd/DHOGOnxzgiQAzaImZl3HmG6i0dX+38KwAqc2r vsX2b0208rGsfkKkB0crMPgsZzTtGQyzPfxT7CxLcBkBZr0zsv3f0FqHWNq9hzXtctW5 TN6g== 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=qeM6ln5GPe+54z6KZr8QF1BPN1lbild34z3N9RGW30M=; fh=ne4TmZ9VPQDb+nvf5AqBey5rYR3n7sUi7PA/P/tMPpY=; b=rBmFAK4/BPOGFMtK3nfFFKvBSZGTiVue1eZHGk+f++FKy7mfLTs55ZIDlhMWknz/5y wx0SCcGx2+s/EQKnGno92inJXBZeik7Lsv1DtnAMYi4OmrwDMpBRo2g3Mud4HiqO6svA 2DeVEh6nm9wfeH0XWXAlW8iWsHXaKyPHvd4pczCPwc/oRKg4NOSni3OWYcsptT8cEFkJ m2GKG1XgKp0TRxDaSg9ggQe2v338vdS8uAOjOEuCAVEIZel0n2V35KetgoqLF9bhpgiT KGuEc44Gpo3stjBEyHzn7q5ipx13R8rQ5XLYEMxrUAos5gh2cPimk+R4tFSyZ3Oi2CXu RTqw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ZBN9BLQe; 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-74740-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74740-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 12-20020a05620a04cc00b007873eaf2e56si10199678qks.24.2024.02.21.04.57.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 04:57:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-74740-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ZBN9BLQe; 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-74740-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74740-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 754D01C22BBF for ; Wed, 21 Feb 2024 12:57:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9C79369967; Wed, 21 Feb 2024 12:56:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ZBN9BLQe" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.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 3EAED4F885 for ; Wed, 21 Feb 2024 12:56:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708520213; cv=none; b=lqOmPEp2YYijCdEgdfVtN/8amaWVqOnwCn3wlxib9DBBg1/g94BAidX/h54ydDx9mHTtyZ8ZUgUOWwFFk/+vpsDjX9/07AnJR+TEoXAJapycXTkBJqsgRjJeklC/MSK2aInD62Lu9z3BT9DS4n0AAmn4oNwmB9GquvK/kr+cWpU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708520213; c=relaxed/simple; bh=pg1mcNVSjCSg//U1qEGOAKr/92rgrkQahsiIB89xZPs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=P1JLskG6HwkDqH0n8FVQWLPpcaIVkqDYBf9TJKhLGv8Yf5wFk+QTdLqRCIhKjFmjy9nc4vG8wFCRAdGLX+YM4p3cdKfBnhhaPN3kHloFoT1nDZa9mAyYjAlQJpJSjY5EMnBldLJXlpbTv+vu99JAcRiWRkdxpt2Qy6t9tJi25LI= 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=ZBN9BLQe; arc=none smtp.client-ip=170.10.133.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=1708520211; 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=qeM6ln5GPe+54z6KZr8QF1BPN1lbild34z3N9RGW30M=; b=ZBN9BLQecB9PZpriCFPxaGUCSMz2NjdcFxAYFp+e9gxHxvN614QDc11BfBGmgylpP/aIUS YrJl5/b+Aqio0ragnEh1i8ZV9JPOCELjc1vZK145tVuo+ua7JbP+dwXNfbYDlh0obqOaIu TkAhdGCL5x8FYpaafrt8N6jcsF5XUKg= 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-376-bWiMgYo1NRyg3lvkXBfQGQ-1; Wed, 21 Feb 2024 07:56:46 -0500 X-MC-Unique: bWiMgYo1NRyg3lvkXBfQGQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (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 6AB5B8630C0; Wed, 21 Feb 2024 12:56:46 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.45.224.78]) by smtp.corp.redhat.com (Postfix) with SMTP id D677C8CE8; Wed, 21 Feb 2024 12:56:44 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Wed, 21 Feb 2024 13:55:28 +0100 (CET) Date: Wed, 21 Feb 2024 13:55:26 +0100 From: Oleg Nesterov To: Christian Brauner Cc: Andy Lutomirski , "Eric W. Biederman" , Tycho Andersen , linux-api@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/2] pidfd: change pidfd_send_signal() to respect PIDFD_THREAD Message-ID: <20240221125525.GA16773@redhat.com> References: <20240216130625.GA8723@redhat.com> <20240216-ohnedies-improvisieren-58edcc102b6a@brauner> <20240216181214.GA10393@redhat.com> <20240220-einwurf-depesche-d8682be0370c@brauner> <20240220090255.GA7783@redhat.com> <20240220-pragmatisch-parzelle-8a1d10a94fae@brauner> <20240220110012.GB7783@redhat.com> <20240220-anlegen-feinmechaniker-3c2cfcc3ec01@brauner> <20240220162201.GD7783@redhat.com> <20240221-zapfhahn-pulsschlag-e8f9d919c350@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: <20240221-zapfhahn-pulsschlag-e8f9d919c350@brauner> User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 On 02/21, Christian Brauner wrote: > > On Tue, Feb 20, 2024 at 05:22:02PM +0100, Oleg Nesterov wrote: > > > > > > > + /* Currently unused. */ > > > > > + if (info) > > > > > + return -EINVAL; > > > > > > > > Well, to me this looks like the unnecessary restriction... And why? > > > > > > Because right now we aren't sure that it's used > > > > Yes, but... > > > > > and we aren't sure what use-cases are there. > > > > the same use-cases as for rt_sigqueueinfo() ? > > Specifically for pidfd_send_signal() I mean. To me it seems very > unlikely that anyone would be opening a pidfd to itself Ah, with this, I do agree. And that is why (I think) we can remove the "task_pid(current) != pid" check in the "info != NULL" branch. Oleg.