lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 1 Nov 2017 16:58:20 +0000 From: Julien Thierry <julien.thierry@....com> To: Steven Rostedt <rostedt@...dmis.org> Cc: linux-arm-kernel@...ts.infradead.org, takahiro.akashi@...aro.org, Will Deacon <will.deacon@....com>, Mark Rutland <mark.rutland@....com>, Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org Subject: Re: [PATCH 2/2] perf: Fix ftrace builtin when kernel doesn't have function_graph On 01/11/17 16:44, Steven Rostedt wrote: > On Wed, 1 Nov 2017 14:33:44 +0000 > Julien Thierry <julien.thierry@....com> wrote: > >> When linux is built without support for function graph tracer, the ftrace >> builtin of perf will fail when trying to reset max_graph_depth because the >> file does not exist. This prevents the use of function tracer from perf. >> >> Do not attempt to write this file when the tracer in use is not >> function_graph. >> >> Signed-off-by: Julien Thierry <julien.thierry@....com> >> Cc: Will Deacon <will.deacon@....com> >> Cc: Mark Rutland <mark.rutland@....com> >> Cc: Peter Zijlstra <peterz@...radead.org> >> Cc: Ingo Molnar <mingo@...hat.com> >> Cc: linux-kernel@...r.kernel.org >> --- >> tools/perf/builtin-ftrace.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c >> index 25a42ac..48120f2 100644 >> --- a/tools/perf/builtin-ftrace.c >> +++ b/tools/perf/builtin-ftrace.c >> @@ -130,7 +130,8 @@ static int reset_tracing_files(struct perf_ftrace *ftrace __maybe_unused) >> if (reset_tracing_cpu() < 0) >> return -1; >> >> - if (write_tracing_file("max_graph_depth", "0") < 0) >> + if (!strcmp(ftrace->tracer, "function_graph") && >> + write_tracing_file("max_graph_depth", "0") < 0) > > Hmm, instead of doing this, could we just do a stat on the file first. > As with trace-cmd, I like to reset files like this even when not > enabling function_graph tracer. > Sounds reasonable. I'll include that change in the next version of the patches. Thanks, -- Julien Thierry
Powered by blists - more mailing lists