On Wed, Oct 16, 2024 at 03:00:50PM +0100, Al Viro wrote: > On Wed, Oct 16, 2024 at 10:32:16AM +0200, Christian Brauner wrote: > > > > ended up calling user_path_at() with empty pathname and nothing like LOOKUP_EMPTY > > > in lookup_flags. Which bails out with -ENOENT, since getname() in there does > > > so. My variant bails out with -EBADF and I'd argue that neither is correct. > > > > > > Not sure what's the sane solution here, need to think for a while... > > > > Fwiw, in the other thread we concluded to just not care about AT_FDCWD with "". > > And so far I agree with that. > > Subject:? https://lore.kernel.org/r/CAGudoHHdccL5Lh8zAO-0swqqRCW4GXMSXhq4jQGoVj=UdBK-Lg@xxxxxxxxxxxxxx Hm, this only speaks about the NULL case. I just looked through codesearch on github and on debian and the only example I found was https://sources.debian.org/src/snapd/2.65.3-1/tests/main/seccomp-statx/test-snapd-statx/bin/statx.py/?hl=71#L71 So really, just special-case it for statx() imho instead of spreading that ugliness everywhere?