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_recursion_record.c | |
parent | 49d67e445742bbcb03106b735b2ab39f6e5c56bc (diff) | |
download | linux-21ccc9cd72116289469e5519b6159c675a2fa58f.tar.gz linux-21ccc9cd72116289469e5519b6159c675a2fa58f.tar.bz2 linux-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_recursion_record.c')
-rw-r--r-- | kernel/trace/trace_recursion_record.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/trace/trace_recursion_record.c b/kernel/trace/trace_recursion_record.c index b2edac1fe156..4d4b78c8ca25 100644 --- a/kernel/trace/trace_recursion_record.c +++ b/kernel/trace/trace_recursion_record.c @@ -226,8 +226,8 @@ __init static int create_recursed_functions(void) { struct dentry *dentry; - dentry = trace_create_file("recursed_functions", 0644, NULL, NULL, - &recursed_functions_fops); + dentry = trace_create_file("recursed_functions", TRACE_MODE_WRITE, + NULL, NULL, &recursed_functions_fops); if (!dentry) pr_warn("WARNING: Failed to create recursed_functions\n"); return 0; |