[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240108102331.7de98cab@gandalf.local.home>
Date: Mon, 8 Jan 2024 10:23:31 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Christian Brauner <brauner@...nel.org>
Cc: LKML <linux-kernel@...r.kernel.org>, Linux Trace Kernel
<linux-trace-kernel@...r.kernel.org>, Masami Hiramatsu
<mhiramat@...nel.org>, Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Linus Torvalds <torvalds@...ux-foundation.org>, Al Viro
<viro@...iv.linux.org.uk>, linux-fsdevel@...r.kernel.org, Greg
Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [PATCH] tracefs/eventfs: Use root and instance inodes as
default ownership
On Mon, 8 Jan 2024 12:04:54 +0100
Christian Brauner <brauner@...nel.org> wrote:
> > > IOW, the inode_permission() in lookup_one_len() that eventfs does is
> > > redundant and just wrong.
> >
> > I don't think so.
>
> I'm very well aware that the dentries and inode aren't created during
> mkdir but the completely directory layout is determined. You're just
> splicing in dentries and inodes during lookup and readdir.
>
> If mkdir /sys/kernel/tracing/instances/foo has succeeded and you later
> do a lookup/readdir on
>
> ls -al /sys/kernel/tracing/instances/foo/events
>
> Why should the creation of the dentries and inodes ever fail due to a
> permission failure?
They shouldn't.
> The vfs did already verify that you had the required
> permissions to list entries in that directory. Why should filling up
> /sys/kernel/tracing/instances/foo/events ever fail then? It shouldn't
> That tracefs instance would be half-functional. And again, right now
> that inode_permission() check cannot even fail.
And it shouldn't. But without dentries and inodes, how does VFS know what
is allowed to open the files?
-- Steve
Powered by blists - more mailing lists