Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp452445imu; Tue, 20 Nov 2018 01:43:43 -0800 (PST) X-Google-Smtp-Source: AJdET5eoaoBF0ww6IrxrDrFmEYRLXqh6lcXjqZRmzRSfs5ia5C2xuYA9z1KHQ1oWK1giHO1S9WF1 X-Received: by 2002:a63:4e15:: with SMTP id c21mr1293294pgb.50.1542707023685; Tue, 20 Nov 2018 01:43:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542707023; cv=none; d=google.com; s=arc-20160816; b=COGCxE/lBBzTpVjM71atblNTM/Dv2vdICJ8A9OHzAvTZ6LUD6z/lnsP6OdLzX9ILO2 W7M+ftlqxVt2z2kRbQ9sihzeiOtLQ4OdhqJu95M16yKKtYlVi5AYwCZX/6QeOyJlQzef NPswS3EESc1mtx1WhKE+FzjK9LIzyCXs3fEdv1sJb0lA8p0OyeeUcl5Fezak5CwKpG+B QQ/BZIkUyEBbwB5qR480Mls4BShO4SnxPUYsnUKHxpweve9+lraqCb3Ahzr62QPViKVJ jqD7PCte1Fb79Im/jkgG73Hw9TrJ6/JaOwZzp7kPLtypL3kfXYjwHKqfM1ths6xUZgSP D7HA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=ByFcFP8fVi/GiFgJkwu694hGYV5O+Vem9yT6QEKN4A4=; b=XY+uJ5blmiX69jLjoTvN3Y+s5FBdDqNsQ4RSaaLDfQ4fpOroeE0Ts8bLv+EKatNKx5 U9KVsxHTHwGWfilaHfNEgSoiezgLKdioF5u3/Kne9gGA/laTai48X5pg/l0QZjfOWF05 pcIVApjuxkFj3i48EQmgQORwSqGhJkn1JJoTrzMCvO3ln2KNbOVk+Qn6u2Vow9jldLC7 d0xCH8nedQwykEfneZ+0OJGGDCKIJlEZhj8736Z2fqm4mB/qIRGvFXIknQF4/96g+zbx UGSBwt3RMgKcNnJa96g4F+0Suz6VqT9tv5wtNO1MLXPcKmmmO2c5XqZL1ApD+9A9h80p oQ5w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u22si6699966pgh.286.2018.11.20.01.43.28; Tue, 20 Nov 2018 01:43:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726930AbeKTTSc (ORCPT + 99 others); Tue, 20 Nov 2018 14:18:32 -0500 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:47914 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726916AbeKTTSb (ORCPT ); Tue, 20 Nov 2018 14:18:31 -0500 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 56C4580976; Tue, 20 Nov 2018 09:50:27 +0100 (CET) Date: Tue, 20 Nov 2018 09:50:29 +0100 From: Pavel Machek To: Daniel Colascione Cc: linux-kernel , Mike Rapoport , Tim Murray , Joel Fernandes , Suren Baghdasaryan , Jonathan Corbet , Andrew Morton , Roman Gushchin , Mike Rapoport , Vlastimil Babka , "Kirill A. Shutemov" , "Dennis Zhou (Facebook)" , Prashant Dhamdhere , "open list:DOCUMENTATION" Subject: Re: [PATCH v2] Document /proc/pid PID reuse behavior Message-ID: <20181120085029.GA10051@amd> References: <20181031150625.147369-1-dancol@google.com> <20181105132205.138695-1-dancol@google.com> <20181119105426.GD28607@amd> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="fUYQa+Pmc3FrFX/N" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --fUYQa+Pmc3FrFX/N Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon 2018-11-19 08:24:02, Daniel Colascione wrote: > On Mon, Nov 19, 2018 at 2:54 AM, Pavel Machek wrote: > > On Mon 2018-11-05 13:22:05, Daniel Colascione wrote: > >> State explicitly that holding a /proc/pid file descriptor open does > >> not reserve the PID. Also note that in the event of PID reuse, these > >> open file descriptors refer to the old, now-dead process, and not the > >> new one that happens to be named the same numeric PID. > >> > >> Signed-off-by: Daniel Colascione > >> --- > >> Documentation/filesystems/proc.txt | 7 +++++++ > >> 1 file changed, 7 insertions(+) > >> > >> Moved paragraphed to start of /proc/pid section; added signed-off-by. > >> > >> diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesy= stems/proc.txt > >> index 12a5e6e693b6..0b14460f721d 100644 > >> --- a/Documentation/filesystems/proc.txt > >> +++ b/Documentation/filesystems/proc.txt > >> @@ -125,6 +125,13 @@ process running on the system, which is named aft= er the process ID (PID). > >> The link self points to the process reading the file system. Eac= h process > >> subdirectory has the entries listed in Table 1-1. > >> > >> +Note that an open a file descriptor to /proc/ or to any of its > >> +contained files or subdirectories does not prevent being reused > >> +for some other process in the event that exits. Operations on > > > > "does not" -> "may not"? > > > > We want to leave this unspecified, so that we can change it in future. >=20 > No. "Does not". I'm sick and tired of procfs behavior being vague and > unspecified to the point where even kernel developers have an You being sick and tired does not mean this is good idea. > incorrect mental model of how it all works. With Christian Brauner's > good work in place and hopefully my own work to follow, we're moving > firmly in the direction of procfs handles being struct pid references. > Instead of waffling further, let's just buy into this model and do the > best job we can of making it work well. So basically decision is being made now, without seeing Christian's and your good work. That's not same thing as documentation... Please don't do this. NAK. Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --fUYQa+Pmc3FrFX/N Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlvzytQACgkQMOfwapXb+vLvuwCgtUWzJEcpROuQ0FLuPRo7zP3d LF0AnREGUrREPKdmydTmPkbyef6sSBLH =30oN -----END PGP SIGNATURE----- --fUYQa+Pmc3FrFX/N--