Re: [PATCH v2 0/5] pid: add pidfd_open()

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
2019-03-30 16:17:10
Also in
lkml
Reply to
Daniel Colascione, 2019-03-30
On Sat, Mar 30, 2019 at 9:11 AM Daniel Colascione [off-list ref] wrote:
How do you propose that someone open the /proc/<pid>/status file in a
race-free manner starting with the result of calling pidfd_open?
CXhrist.

If you want to open a /proc file, then open a /proc file. Don't use
pidfd_open().

Just open /proc/<pid>/

Then you can use openat() to open whatever sub-files you want.

You have two choices: either you use /proc, or you don't. Don't mix the two.

And no, we are *NOT* making pidfd_open() into some "let's expose /proc
even when it's not mounted" horror. Seriously. That's disgusting,
wrong, insecure and stupid.

                           Linus
Thread (82 messages) 82 messages, 12 authors, last reply 2019-04-01
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help