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 06:11:18PM +0100, Al Viro wrote:
> 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...

Which I think is really broken testing nonsense anyway so really we
could easily get them to change this and not even have to worry about
this. We've done stuff like that before. But I'm fine either way.




[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