diff options
author | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2021-08-18 11:24:51 -0400 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2021-10-08 18:08:43 -0400 |
commit | 21ccc9cd72116289469e5519b6159c675a2fa58f (patch) | |
tree | cb906db82f29de610727da5d7f35a3f39b99824b /kernel/trace/trace_printk.c | |
parent | 49d67e445742bbcb03106b735b2ab39f6e5c56bc (diff) | |
download | lwn-21ccc9cd72116289469e5519b6159c675a2fa58f.tar.gz lwn-21ccc9cd72116289469e5519b6159c675a2fa58f.zip |
tracing: Disable "other" permission bits in the tracefs files
When building the files in the tracefs file system, do not by default set
any permissions for OTH (other). This will make it easier for admins who
want to define a group for accessing tracefs and not having to first
disable all the permission bits for "other" in the file system.
As tracing can leak sensitive information, it should never by default
allowing all users access. An admin can still set the permission bits for
others to have access, which may be useful for creating a honeypot and
seeing who takes advantage of it and roots the machine.
Link: https://lkml.kernel.org/r/20210818153038.864149276@goodmis.org
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace_printk.c')
-rw-r--r-- | kernel/trace/trace_printk.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/trace/trace_printk.c b/kernel/trace/trace_printk.c index 4b320fe7df70..29f6e95439b6 100644 --- a/kernel/trace/trace_printk.c +++ b/kernel/trace/trace_printk.c @@ -384,7 +384,7 @@ static __init int init_trace_printk_function_export(void) if (ret) return 0; - trace_create_file("printk_formats", 0444, NULL, + trace_create_file("printk_formats", TRACE_MODE_READ, NULL, NULL, &ftrace_formats_fops); return 0; |