Skip to content

Fixes to d_path: Respin

Andreas Gruenbacher linux-fsdevel lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 16 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7Fix __d_path() for lazy unmounts and make it unambiguousfs/dcache.c+98 -711 reply
2/7Make d_path() consistent across mount operationsfs/dcache.c+8 -60 replies
3/7Add d_namespace_path() to compute namespace relative pathnamesfs/dcache.c fs/namespace.c include/linux/dcache.h +1 more+34 -32 replies
4/7Make getcwd() only return valid pathsfs/dcache.c+3 -10 replies
5/7Remove duplicate proc codefs/proc/base.c+15 -300 replies
6/7Filter out disconnected paths from /proc/mountsfs/namespace.c fs/proc/base.c+30 -31 reply
7/7Distinguish between connected and disconnected paths in d_path()fs/dcache.c+4 -140 replies

Reviews trailers per patch

2 of 7 patches have a Reviewed-by or Acked-by.

PatchJohn JohansenAlan Cox
1/7
2/7
3/7R-b
4/7
5/7
6/7A-b
7/7

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [d_path 0/7] Fixes to d_path: Respin
Quoted 4 lines · Alan Cox

Can you prove no existing application on the planet relies on the existing behaviour ? Actually more limited but sane as a test would be "Can you prove that the glibc behaviour visible to applications does not change"

As far as I can see, glibc internally looks at /proc/mounts (or else mtab) to find out where tmpfs is mounted for opening files there, and to look up filesystem information for statfs(), while accessing that path, too. Fstatfs() also looks into the same files, but it only matches by filesystem type, so this is only a very unreliable heuristic, anyway.

So judging from that, glibc users should be fine.

Quoted 3 lines

I disagree - firstly because of not breaking stuff, and secondly because it separates two discussions - merging AppArmor being one of them , and the correct behaviour for getcwd & /proc/mounts being the other.

I agree with the separation of discussion argument. Here are patches that change getcwd() and /proc/mounts independent of the changes that AppArmor depends on.

Thanks for your feedback!

Andreas