* [PATCH 1/2] ftrace: Have set_graph_* files have normal file modes
2018-05-04 15:52 [PATCH 0/2] [GIT PULL] tracing: Minor fixes Steven Rostedt
@ 2018-05-04 15:52 ` Steven Rostedt
2018-05-04 15:52 ` [PATCH 2/2] tracing: Fix the file mode of stack tracer Steven Rostedt
1 sibling, 0 replies; 3+ messages in thread
From: Steven Rostedt @ 2018-05-04 15:52 UTC (permalink / raw)
To: linux-kernel
Cc: Linus Torvalds, Ingo Molnar, Andrew Morton, Namhyung Kim,
Chen LinX
[-- Attachment #1: 0001-ftrace-Have-set_graph_-files-have-normal-file-modes.patch --]
[-- Type: text/plain, Size: 1284 bytes --]
From: Chen LinX <linx.z.chen@intel.com>
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.
Link: http://lkml.kernel.org/r/1409725869-4501-1-git-send-email-linx.z.chen@intel.com
Acked-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Chen LinX <linx.z.chen@intel.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
kernel/trace/ftrace.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 16bbf062018f..8d83bcf9ef69 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -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 */
--
2.17.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH 2/2] tracing: Fix the file mode of stack tracer
2018-05-04 15:52 [PATCH 0/2] [GIT PULL] tracing: Minor fixes Steven Rostedt
2018-05-04 15:52 ` [PATCH 1/2] ftrace: Have set_graph_* files have normal file modes Steven Rostedt
@ 2018-05-04 15:52 ` Steven Rostedt
1 sibling, 0 replies; 3+ messages in thread
From: Steven Rostedt @ 2018-05-04 15:52 UTC (permalink / raw)
To: linux-kernel; +Cc: Linus Torvalds, Ingo Molnar, Andrew Morton, Zhengyuan Liu
[-- Attachment #1: 0002-tracing-Fix-the-file-mode-of-stack-tracer.patch --]
[-- Type: text/plain, Size: 956 bytes --]
From: Zhengyuan Liu <liuzhengyuan@kylinos.cn>
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.
Link: http://lkml.kernel.org/r/1518054113-28096-1-git-send-email-liuzhengyuan@kylinos.cn
Signed-off-by: Zhengyuan Liu <liuzhengyuan@kylinos.cn>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
kernel/trace/trace_stack.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/trace/trace_stack.c b/kernel/trace/trace_stack.c
index 3c7bfc4bf5e9..4237eba4ef20 100644
--- a/kernel/trace/trace_stack.c
+++ b/kernel/trace/trace_stack.c
@@ -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
--
2.17.0
^ permalink raw reply related [flat|nested] 3+ messages in thread