Skip to contentSkip to conversation

tracing: Minor fixes

GIT PULL New Steven Rostedt 1 participant 3 messages May 4, 2018

Subsystems (2)
lore
Share & tools
lore

Steven Rostedt

author maintainer
#0 lore raw

Linus,

Some of the files in the tracing directory show file mode 0444 when they are writable by root. To fix the confusion, they should be 0644. Note, either case root can still write to them.

Note, Zhengyuan asked why I never applied that patch (the first one is from 2014!). I simply forgot about it. /me lowers head in shame.

Please pull the latest trace-v4.17-rc1-3 tree, which can be found at:

git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
trace-v4.17-rc1-3

Tag SHA1: b23eed18b73241c8aa5829cc6f570610ce65c93b Head SHA1: 0c5a9acc8b4e878e761f735e144d4a7e4477d4e6

Chen LinX (1):
ftrace: Have set_graph_* files have normal file modes

Zhengyuan Liu (1):
tracing: Fix the file mode of stack tracer

----

 kernel/trace/ftrace.c      | 4 ++--
 kernel/trace/trace_stack.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
author maintainer
#1 lore raw

PATCH 1/2 ftrace: Have set_graph_* files have normal file modes

From: Chen LinX <[email protected]>

The set_graph_function and set_graph_notrace file mode should be 0644 instead of 0444 as they are writeable. Note, the mode appears to be ignored regardless, but they should at least look sane.

---
 kernel/trace/ftrace.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/trace/ftrace.c +2 -2
index 16bbf062018f..8d83bcf9ef69 100644
@@ -5514,10 +5514,10 @@ static __init int ftrace_init_dyn_tracefs(struct dentry *d_tracer)
 	ftrace_create_filter_files(&global_ops, d_tracer);
 
 #ifdef CONFIG_FUNCTION_GRAPH_TRACER
-	trace_create_file("set_graph_function", 0444, d_tracer,
+	trace_create_file("set_graph_function", 0644, d_tracer,
 				    NULL,
 				    &ftrace_graph_fops);
-	trace_create_file("set_graph_notrace", 0444, d_tracer,
+	trace_create_file("set_graph_notrace", 0644, d_tracer,
 				    NULL,
 				    &ftrace_graph_notrace_fops);
 #endif /* CONFIG_FUNCTION_GRAPH_TRACER */
Signature · 1 line
2.17.0
author maintainer
#2 lore raw

PATCH 2/2 tracing: Fix the file mode of stack tracer

In reply to Steven Rostedt

From: Zhengyuan Liu <[email protected]>

It looks weird that the stack_trace_filter file can be written by root but shows that it does not have write permission by ll command.

---
 kernel/trace/trace_stack.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/trace/trace_stack.c +1 -1
index 3c7bfc4bf5e9..4237eba4ef20 100644
@@ -472,7 +472,7 @@ static __init int stack_trace_init(void)
 			NULL, &stack_trace_fops);
 
 #ifdef CONFIG_DYNAMIC_FTRACE
-	trace_create_file("stack_trace_filter", 0444, d_tracer,
+	trace_create_file("stack_trace_filter", 0644, d_tracer,
 			  &trace_ops, &stack_trace_filter_fops);
 #endif
 
Signature · 1 line
2.17.0