Re: [PATCH 2/2] debugfs: only allow root access to debugging interfaces

Arnd Bergmann
2011-02-26T11:51:21Z

On Thursday 24 February 2011, Steven Rostedt wrote:
> Currently things are still in a large flux, and I do not know how this
> will play out. Although the changes in /debugfs/tracing has toned down a
> lot, there's also the work going in on how to merge perf and ftrace.
> This may start changes as well, and perhaps deprecate interfaces. I
> don't know.
>
> Having debugfs as the main interface was not the goal of all this, but
> we seemed to have just gotten stuck with it.

Some time ago, I started a patch set to make it possible to unify a
lot of the pseudo file systems like debugfs, configfs and others, and
to also make it possible to trivially create another file_system_type,
basically creating a new root inode in the same way that you'd create a new
debugfs directory.

The patch set is probably quite outdated now, and I currently don't have
time to finish it, but I'd be happy to help someone else refresh it
to get it upstream.

Once that is done, you could move the tracing files and any other
parts of debugfs that have evolved into a proper API into their own
file systems without changing much code.

This would in particular make it possible to mount the main debugfs
root-only while you can have other rules for parts of it that have
become real interfaces.

Arnd