Re: [RFC][PATCH] getname_maybe_null() - the third variant of pathname copy-in

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Oct 19, 2024 at 09:15:32AM -0700, Linus Torvalds wrote:

> IOW, I think the (NULL, AT_EMPTY_PATH) tuple makes sense as a way to
> pass just an 'fd', but I'm _not_ convinced it makes sense as a way to
> pass in AT_FDCWD.
> 
> Put another way: imagine you have a silly library implementation that does
> 
>     #define fstat(fd,buf) fstatat(fd, NULL, buf, AT_EMPTY_PATH)
> 
> and I think *that* is what we want to support. But if 'fd' is not a
> valid fd, you should get -EBADF, not "fstat of current working
> directlry".
> 
> Hmm?

There'd been an example of live use of that posted upthread:

https://sources.debian.org/src/snapd/2.65.3-1/tests/main/seccomp-statx/test-snapd-statx/bin/statx.py/?hl=71#L71

"" rather than NULL, but...
 
> This is not a hugely important thing. If people really think that
> doing "fstat()" on the current working directory is worth doing this
> for, then whatever.




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux