Thread (43 messages) 43 messages, 4 authors, 2024-01-31

Re: [PATCH 6/6] eventfs: clean up dentry ops and add revalidate function

From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Date: 2024-01-31 23:07:19
Also in: lkml

On Wed, 31 Jan 2024 13:00:39 -0500
Steven Rostedt [off-list ref] wrote:
On Tue, 30 Jan 2024 11:03:55 -0800
Linus Torvalds [off-list ref] wrote:
quoted
It would probably be cleaner to make eventfs its own filesystem, or at
least set its own dentry ops when looking up eventfs files.  But as it
is, only eventfs dentries use d_fsdata, so we don't really need to split
these things up by use.
BTW, I have been thinking about making eventfs a completely separate file
system that could be mounted outside of tracefs. One that is readonly that
only contains the "id" and "format" files and nothing more.

Why? Because perf and powertop both use those files to know how to parse
the raw event formats. I don't think there's anything in there that
requires root privileges to read. They should not be exposing any internal
kernel information besides the event format layouts, and it would be nice
to have a /sys/kernel/events directory that only had that.
That's a good idea! So maybe we can allow perf to read it without root user.
Making eventfs a separate file system where, when added to tracefs, has the
control files for the specific trace_array, but for the /sys/kernel
directory, only cares about the trace format files.

Then tracefs could be nicely converted over to kernfs, and eventfs would be
its own entity.
If so, maybe we can just make symlinks to the 'id' and 'format' from events
under tracefs? :)

Thank you,
-- Steve

-- 
Masami Hiramatsu (Google) [off-list ref]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help