All of lore.kernel.org
 help / color / mirror / Atom feed
* Behaviour of /proc/self/fd/NN
@ 2018-11-14 10:45 Nikolaus Rath
  2018-11-14 11:57 ` Miklos Szeredi
  0 siblings, 1 reply; 6+ messages in thread
From: Nikolaus Rath @ 2018-11-14 10:45 UTC (permalink / raw)
  To: linux-fsdevel, Al Viro, Neil Brown; +Cc: Miklos Szeredi

Hi,

If I understand Documentation/filesystems/path-lookup.md correctly, then
the "symlinks" in /proc/self/fd/NN are not true symlinks but just
presented as such to userspace. Does this mean that I can access (e.g.,
open(), setxattr(), or chmod()) these files without the possibility of
race conditions? I.e., there is no way for someone to rename the target
after the kernel has "looked up" the target but before the operation is
applied?

Secondly, under which conditions can I open the files in /proc? Does
this still work if the destination file has been unlinked? Does it
always follow renames? What if I mounted something over the destination?

(Background: I'm trying to ascertain how well a true bind mount can be
emulated by a passthrough FUSE filesystem).

Best,
-Nikolaus
-- 
GPG Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F

             »Time flies like an arrow, fruit flies like a Banana.«

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-11-14 22:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-14 10:45 Behaviour of /proc/self/fd/NN Nikolaus Rath
2018-11-14 11:57 ` Miklos Szeredi
2018-11-14 12:10   ` Nikolaus Rath
2018-11-14 12:20     ` Miklos Szeredi
2018-11-14 12:29       ` Nikolaus Rath
2018-11-14 12:33         ` Miklos Szeredi

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.