All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alejandro Colomar <alx@kernel.org>
To: ellie <el@horse64.org>
Cc: linux-man@vger.kernel.org, Petr Gajdos <pgajdos@suse.cz>
Subject: Re: Suggestion for clarifications on "man 5 proc" page regarding /proc/[pid]/self race conditions
Date: Tue, 12 Dec 2023 15:17:11 +0100	[thread overview]
Message-ID: <ZXhrblTGLBirUpki@debian> (raw)
In-Reply-To: <e170ffa6-986a-4e55-9d44-27d7d7520151@horse64.org>

[-- Attachment #1: Type: text/plain, Size: 2412 bytes --]

Dear ellie, Petr,

On Tue, Dec 12, 2023 at 09:47:58AM +0100, ellie wrote:
> Dear Alejandro Colomar,
> 
> I hope I'm emailing this to the correct place, I found this contact
> information on https://man7.org/mtk/contact.html regarding man page
> feedback:

Yep, this is the correct place.

Petr, Michael retired from maintaining the project a couple of years
ago.  As Michael says in <https://www.man7.org/mtk/contact.html>,
reports about the Linux man-pages should be reported to this mailing
list, following the ./CONTRIBUTING file
<https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/CONTRIBUTING>.

> 
> I'm suggesting that the "man 5 proc" page is expanded with a section

I've recently splitted the proc(5) page into many small pages, one for
each file or directory.  You may want to check the current manual pages.
You can do that by reading directly from the repository, or by reading
the PDF book (thanks to Deri James, from gropdf(1), for contributing the
scripts to produce the book).

To check the book as of the latest commit in git HEAD, you can check
<https://www.alejandro-colomar.es/share/dist/man-pages/git/HEAD/man-pages-HEAD.pdf>

You will probably want to check proc_self(5) --which is a link page; the
text is actually in proc_pid(5)--.  proc(5) still contains some small
mention of /proc/self, so you'll want to check that too.

> clarifying /proc/[pid]/self

You probably mean /proc/self/, or /proc/[pid]/.

> race conditions, I described details and even
> made a text suggestion here:
> 
> https://bugzilla.suse.com/show_bug.cgi?id=1216352

After seeing the suggestion, you'll want to check proc_pid_exe(5):

<https://www.alejandro-colomar.es/share/dist/man-pages/git/HEAD/man-pages-HEAD.pdf#proc_pid_exe.5>

You could add a CAVEATS section in that page.  Please write also a test
program that reproduces the race condition, and another one which
demonstrates how your solution doesn't.  Those test programs will be
useful to include in the commit message.

> (The text suggestion might be wrong, however, since I don't actually know
> what the exact technical state of this is.)

It looks good.  With a small example program that demonstrates it,
you'll be able to answer your doubts.  ;-)

Have a lovely day!
Alex

-- 
<https://www.alejandro-colomar.es/>
Looking for a remote C programming job at the moment.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2023-12-12 14:17 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-12  8:47 Suggestion for clarifications on "man 5 proc" page regarding /proc/[pid]/self race conditions ellie
2023-12-12 14:17 ` Alejandro Colomar [this message]
2023-12-12 16:55   ` ellie
2023-12-12 17:39     ` Alejandro Colomar
2023-12-12 17:55       ` ellie
2023-12-13  9:31         ` Alejandro Colomar
2023-12-13  9:41           ` ellie
2023-12-13 13:54           ` Alejandro Colomar
2023-12-13 13:57             ` ellie
2024-06-07 22:23 ` ellie
2024-06-09 17:08   ` Alejandro Colomar
2024-06-09 17:28   ` Alejandro Colomar
2024-06-09 17:29   ` Alejandro Colomar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZXhrblTGLBirUpki@debian \
    --to=alx@kernel.org \
    --cc=el@horse64.org \
    --cc=linux-man@vger.kernel.org \
    --cc=pgajdos@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.