[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <eeb7e9895aca92fa5a8d11d9f37b283428185278.camel@xry111.site>
Date: Sun, 23 Jun 2024 08:59:40 +0800
From: Xi Ruoyao <xry111@...111.site>
To: Linus Torvalds <torvalds@...ux-foundation.org>, Mateusz Guzik
<mjguzik@...il.com>
Cc: Christian Brauner <brauner@...nel.org>, Alexander Viro
<viro@...iv.linux.org.uk>, Jan Kara <jack@...e.cz>, Steven Rostedt
<rostedt@...dmis.org>, Masami Hiramatsu <mhiramat@...nel.org>, Alejandro
Colomar <alx@...nel.org>, Arnd Bergmann <arnd@...db.de>, Huacai Chen
<chenhuacai@...ngson.cn>, Xuerui Wang <kernel@...0n.name>, Jiaxun Yang
<jiaxun.yang@...goat.com>, Icenowy Zheng <uwu@...nowy.me>,
linux-fsdevel@...r.kernel.org, linux-trace-kernel@...r.kernel.org,
linux-arch@...r.kernel.org, loongarch@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] vfs: Add AT_EMPTY_PATH_NOCHECK as unchecked
AT_EMPTY_PATH
On Sat, 2024-06-22 at 15:41 -0700, Linus Torvalds wrote:
> I do think that we should make AT_EMPTY_PATH with a NULL path
> "JustWork(tm)", because the stupid "look if the pathname is empty" is
> horrible.
>
> But moving that check into getname() is *NOT* the right answer,
> because by the time you get to getname(), you have already lost.
Oops. I'll try to get around of getname() too...
> So the short-cut in vfs_fstatat() to never get a pathname is
> disgusting - people should have used 'fstat()' - but it's _important_
> disgusting.
The problem is we don't have fstat() for LoongArch, and it'll be
unusable on all 32-bit arch after 2037.
And Arnd hates the idea adding fstat() for LoongArch because there would
be one more 32-bit arch broken in 2037.
Or should we just add something like "fstat_2037()"?
--
Xi Ruoyao <xry111@...111.site>
School of Aerospace Science and Technology, Xidian University
Powered by blists - more mailing lists