linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Christian Brauner <brauner@kernel.org>, linux-fsdevel@vger.kernel.org
Subject: Re: [RFC][PATCH] getname_maybe_null() - the third variant of pathname copy-in
Date: Sat, 19 Oct 2024 18:11:18 +0100	[thread overview]
Message-ID: <20241019171118.GE1172273@ZenIV> (raw)
In-Reply-To: <CAHk-=wh_QbELYAqcfvSdF7mBcu+6peXSCzeJVyg+N+Co+wWg5g@mail.gmail.com>

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.

  reply	other threads:[~2024-10-19 17:11 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-09  4:03 [RFC][PATCH] getname_maybe_null() - the third variant of pathname copy-in Al Viro
2024-10-15 14:05 ` Christian Brauner
2024-10-16  5:09   ` Al Viro
2024-10-16  8:32     ` Christian Brauner
2024-10-16 14:00       ` Al Viro
2024-10-16 14:49         ` Christian Brauner
2024-10-17 23:54           ` Al Viro
2024-10-18 11:06             ` Christian Brauner
2024-10-18 16:51               ` Al Viro
2024-10-18 19:38                 ` Al Viro
2024-10-19  5:03                   ` Al Viro
2024-10-19 16:15                     ` Linus Torvalds
2024-10-19 17:11                       ` Al Viro [this message]
2024-10-19 17:27                         ` Linus Torvalds
2024-10-21 12:38                         ` Christian Brauner
2024-10-21 12:39                     ` Christian Brauner
2024-10-21 17:09                       ` Al Viro
2024-10-21 22:43                         ` Al Viro
2024-10-22  8:49                           ` Christian Brauner
2024-10-30  6:37                             ` Al Viro
2024-10-21 12:47                   ` Christian Brauner
2024-10-21 17:05                     ` Al Viro
2024-10-21 12:36                 ` Christian Brauner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241019171118.GE1172273@ZenIV \
    --to=viro@zeniv.linux.org.uk \
    --cc=brauner@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).