TraceFS: The Newest Linux File-System

Written by Michael Larabel in Linux Kernel on 21 January 2015 at 03:10 PM EST. 8 Comments
Steven Rostedt sent out the announcement today for TraceFS, a new file-system for the Linux kernel tracing subsystem.

Rostedt explained the purpose of TraceFS well via his LKML announcement:
There has been complaints that tracing is tied too much to debugfs, as there are systems that would like to perform tracing, but do not mount debugfs for security reasons. That is because any subsystem may use debugfs for debugging, and these interfaces are not always tested for security.

Creating a new tracefs that the tracing directory will now be attached to allows system admins the ability to access the tracing directory without the need to mount debugfs.

Another advantage is that debugfs does not support the system calls for mkdir and rmdir. Tracing uses these system calls to create new instances for sub buffers. This was done by a hack that hijacked the dentry ops from the "instances" debugfs dentry, and replacing it with one that could work.

Instead of using this hack, tracefs can provide a proper interface to allow the tracing system to have a mkdir and rmdir feature.

To maintain backward compatibility with older tools that expect that the tracing directory is mounted with debugfs, the tracing directory is still created under debugfs and tracefs is automatically mounted there.

Finally, a new directory is created when tracefs is enabled called /sys/kernel/tracing. This will be the new location that system admins may mount tracefs if they are not using debugfs.
So basically TraceFS provides the same functionality now for kernel traces that is done currently via DebugFS. With TraceFS though you don't need to worry about enabling the potentially security-prone DebugFS and by having their own file-system it can implement features not supported by DebugFS (e.g. mkdir and rmdir support). Assuming it clears developer review fine, it's possible we could see TraceFS for Linux 3.20 or another near-term kernel update.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via

Popular News This Week