From: Steven Rostedt <rostedt@goodmis.org>
To: Zhengyuan Liu <liuzhengyuan@kylinos.cn>
Cc: mingo@redhat.com, linux-kernel@vger.kernel.org,
liuzhengyuang521@gmail.com, linx.z.chen@intel.com
Subject: Re: [PATCH] ftrace: fix the file mode of graph tracer and stack tracer
Date: Thu, 8 Feb 2018 10:21:49 -0500 [thread overview]
Message-ID: <20180208102149.7e3bfe45@gandalf.local.home> (raw)
In-Reply-To: <1518054113-28096-1-git-send-email-liuzhengyuan@kylinos.cn>
On Thu, 8 Feb 2018 09:41:53 +0800
Zhengyuan Liu <liuzhengyuan@kylinos.cn> wrote:
> It's something looks weird that those files could be written by root
> but shows with no write permission by ll command.
> Chen LinX <linx.z.chen@intel.com> has sent a similar patch to fix
> graph function file mode in 2000, I didn't get the reason why that
> patch wasn't applied so I resend it.
>
> Signed-off-by: Zhengyuan Liu <liuzhengyuan@kylinos.cn>
> ---
> kernel/trace/ftrace.c | 4 ++--
> kernel/trace/trace_stack.c | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
> index ccdf366..fe903dc8 100644
> --- a/kernel/trace/ftrace.c
> +++ b/kernel/trace/ftrace.c
> @@ -5513,10 +5513,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,
Thanks for resending the patch.
What's interesting is that this doesn't seem to affect whether or not
root can write to the file. I wonder if that's a bug itself.
-- Steve
> 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 */
> diff --git a/kernel/trace/trace_stack.c b/kernel/trace/trace_stack.c
> index 734accc..4356f14 100644
> --- a/kernel/trace/trace_stack.c
> +++ b/kernel/trace/trace_stack.c
> @@ -468,7 +468,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
>
next prev parent reply other threads:[~2018-02-08 15:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-08 1:41 Zhengyuan Liu
2018-02-08 15:21 ` Steven Rostedt [this message]
2018-02-09 2:33 ` [PATCH] ftrace: fix the file mode of graph tracer and stacktracer Zhengyuan Liu
2018-02-09 3:21 ` Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180208102149.7e3bfe45@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linx.z.chen@intel.com \
--cc=liuzhengyuan@kylinos.cn \
--cc=liuzhengyuang521@gmail.com \
--cc=mingo@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®