Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1822668rdb; Wed, 31 Jan 2024 10:03:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IEfh6DC3OpPvXPtB9GIv/hLrl8XHLo5L04+S7zxFESUtgsOGpvmt9Sztid6X9/OgfO7QCBF X-Received: by 2002:a17:906:ae8e:b0:a36:667e:ecb0 with SMTP id md14-20020a170906ae8e00b00a36667eecb0mr1648436ejb.67.1706724203244; Wed, 31 Jan 2024 10:03:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706724203; cv=pass; d=google.com; s=arc-20160816; b=wH1wTxszde0a3h7qkr424OeZ4dCdO0uLr+YOhKmHcfmpepBLv0Go+PoXgSJfA7Uei2 miivHsdzgDa31XA090EqdU2a9WLmA8vJZK41HeiD/owt0eGIAIlIRfWXRr4tWV/Ltc+r mfh/Bm/uRq395Ogyb0KLnw9ChdqiXHNiSnmRTDSwAmnKc7qb5I2PRDEr4s1oF8WdiU7p PNrYN7fNUrunP9IzuIHyQ5l93DDpfdM1yD1S/xbF8bkNTTskVMCdMHX14YvULxwVZhBl N1lYArGGNthWOxul4W7759KTG0A05n2isdf8CavZYSwaGRPIkHq/RxDjhE+VBqWQNFN/ bmpQ== 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=8OjWSdnzVIc5DKpSGecXOiiUOX1tI2G9mHRb0zHs00A=; fh=c6nK9ocfV1+WFtzF30R8T6d8YDSf0GXsOf/oIGmuylw=; b=Z/CdyAZpMrKs2YoiKgsnVqLcXQiy7AKTMkGVpM9Z0J5xK7yzEisVIOlhx9PKtrwmLt qBY4gVLyvrJ6VvifUcESOvGf78dumw189peMNqpd/Zg6/5gcYrOscfeQ9ys77ib2Mp0Z v7wWFXPYtzfrkI74VARqka1EzGdjFLQkGu/kgWQVJncCS8kI36SPnlw0ENPj9SmbdvJU v09DiTvGJBaViugc3H16mH1w+4QPAR+RMmVgIDft1txFfuIZUT1keVtPOxNB5bOPEX3j 6u5nu/YbUOKoXVC50AqxL2dxXpjKHiDLrIffv4Pbol2r7Vfgz2sfbJxyUcwT3zCz/Rir f/eQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PNHC8j7g; 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-46947-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46947-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com X-Forwarded-Encrypted: i=1; AJvYcCUxJ5adNPE2aTYApKrOdnFNqooFxpb0KFSgNJT6sffMI5FAghzLTSmNiiz/fC8dJWHBPEwI/bMiDEzpGx5ytpF1f+GYiMqBZP0BGzmr1w== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id h18-20020a1709063c1200b00a36777ebe4esi856597ejg.557.2024.01.31.10.03.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 10:03:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-46947-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PNHC8j7g; 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-46947-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46947-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 am.mirrors.kernel.org (Postfix) with ESMTPS id DC9F71F24F0E for ; Wed, 31 Jan 2024 18:03:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 324CE12FF7A; Wed, 31 Jan 2024 18:03:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="PNHC8j7g" 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 C7DD512DDAB for ; Wed, 31 Jan 2024 18:03:08 +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=1706724190; cv=none; b=FYfHweucS5pb6Ah/C+GWL2RU513tYqnIUnHuJkbjHeUtc4DHRPAETJVIEshKTn2UYBB1I2VhQg3+wXyOwV51my9CWw8DMau1jiZB5tWrs6c5ytD5eVIfZgUrmX+3niav7UdWd7eOfsIjkCwHr70RKMHLTHJSgpklA93/iYQzzVA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706724190; c=relaxed/simple; bh=fC3hvECKtCFypEuerDMNoG/UZBOT7Ld0GR4SGXo8Mr4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=S2zoB2oM6pGZj4ildfw/EWrdXwuVnI6HnqoXewFao118z+vME1qDl1R33BB7U/DCSqlvRv5JgQEJlgJwphS4KtyxXHzH43yXdASjVrtfDCsnwtKZczPm9W/4th1onob3CwjJ6J/fXULqE1yHvIXSdSYgOCHOumkERP7+m9PW0lM= 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=PNHC8j7g; 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=1706724187; 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=8OjWSdnzVIc5DKpSGecXOiiUOX1tI2G9mHRb0zHs00A=; b=PNHC8j7gmGxJnrh92/DyaAo8CmowjIGHcwDwaisHe3Qq5CTEuE5PNhWTmnrz5cUAEH/YhQ 7rsM62MXJiFEI/u2WLmfYXXHUAwIZg/UET2ZOyowW2+OEFHW9OlACoUkcXN4Xbp/Ohux/w KgXz3gJ57cp9s07pkkVYXipCFgEpdX0= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-538-jvh8vazaP-i5_VuRTPYOrg-1; Wed, 31 Jan 2024 13:03:04 -0500 X-MC-Unique: jvh8vazaP-i5_VuRTPYOrg-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 D98C63806291; Wed, 31 Jan 2024 18:03:03 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.45.225.249]) by smtp.corp.redhat.com (Postfix) with SMTP id BD4BB48C; Wed, 31 Jan 2024 18:03:02 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Wed, 31 Jan 2024 19:01:49 +0100 (CET) Date: Wed, 31 Jan 2024 19:01:47 +0100 From: Oleg Nesterov To: Tycho Andersen Cc: Christian Brauner , "Eric W. Biederman" , linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 1/1] pidfd: implement PIDFD_THREAD flag for pidfd_open() Message-ID: <20240131180146.GD2609@redhat.com> References: <20240131132541.GA23632@redhat.com> <20240131132602.GA23641@redhat.com> 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: User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 On 01/31, Tycho Andersen wrote: > > > int pidfd_prepare(struct pid *pid, unsigned int flags, struct file **ret) > > { > > - if (!pid || !pid_has_task(pid, PIDTYPE_TGID)) > > + bool thread = flags & PIDFD_THREAD; > > + > > + if (!pid || !pid_has_task(pid, thread ? PIDTYPE_PID : PIDTYPE_TGID)); > > Small typo here, trailing ;. When I fix that, tests pass for me. OOPS. Christian, should I spam lkml with v4, or will you add this fix yourself? > Assuming that's fixed up: > > Reviewed-by: Tycho Andersen > Tested-by: Tycho Andersen Thanks Tycho!!! Oleg.