On Tue, 30 Jan 2024 11:03:55 -0800 Linus Torvalds <torva...@linux-foundation.org> wrote:
> 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. 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. -- Steve