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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240604151821.5694e908@gandalf.local.home>
Date: Tue, 4 Jun 2024 15:18:21 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Mark Rutland <mark.rutland@....com>
Cc: Masami Hiramatsu <mhiramat@...nel.org>, linux-kernel@...r.kernel.org,
 linux-trace-kernel@...r.kernel.org, Mathieu Desnoyers
 <mathieu.desnoyers@...icios.com>, Andrew Morton
 <akpm@...ux-foundation.org>, Alexei Starovoitov
 <alexei.starovoitov@...il.com>, Florent Revest <revest@...omium.org>,
 Martin KaFai Lau <martin.lau@...ux.dev>, bpf <bpf@...r.kernel.org>, Sven
 Schnelle <svens@...ux.ibm.com>, Alexei Starovoitov <ast@...nel.org>, Jiri
 Olsa <jolsa@...nel.org>, Arnaldo Carvalho de Melo <acme@...nel.org>, Daniel
 Borkmann <daniel@...earbox.net>, Alan Maguire <alan.maguire@...cle.com>,
 Peter Zijlstra <peterz@...radead.org>, Thomas Gleixner
 <tglx@...utronix.de>, Guo Ren <guoren@...nel.org>
Subject: Re: [PATCH v3 00/27] function_graph: Allow multiple users for
 function graph tracing

On Tue, 4 Jun 2024 14:57:42 -0400
Steven Rostedt <rostedt@...dmis.org> wrote:

> Bah, I just ran the test.d/ftrace/func-filter-pid.tc and it fails too. This
> did pass my other tests that do run ftracetests. Hmm, I just ran it on my
> test box that does the tests and it passes there. I wonder if there's some
> config option that makes it fail :-/
> 
> Well, now that I see it fail, I can investigate.

Ah, figured it out. The updated pid test isn't working. This explains why
my test machine didn't fail, as it doesn't have the updated ftracetests.

The problem was that I never set the funcgraph-proc option, even though I
saved it :-p

That is, it shows:

> 	+ cat trace
> 	# tracer: function_graph
> 	#
> 	# CPU  DURATION                  FUNCTION CALLS
> 	# |     |   |                     |   |   |   |
> 	 3) ! 143.685 us  |  kernel_clone();
> 	 3) ! 127.055 us  |  kernel_clone();
> 	 1) ! 127.170 us  |  kernel_clone();
> 	 3) ! 126.840 us  |  kernel_clone();

But when you do: echo 1 > options/funcgraph-proc

You get:

# cat trace
# tracer: function_graph
#
# CPU  TASK/PID         DURATION                  FUNCTION CALLS
# |     |    |           |   |                     |   |   |   |
 4)    bash-939    | # 1070.009 us |  kernel_clone();
 4)    bash-939    | # 1116.903 us |  kernel_clone();
 5)    bash-939    | ! 976.133 us  |  kernel_clone();
 5)    bash-939    | ! 954.012 us  |  kernel_clone();
 5)    bash-939    | ! 905.825 us  |  kernel_clone();
 5)    bash-939    | # 1130.922 us |  kernel_clone();
 7)    bash-939    | # 1097.648 us |  kernel_clone();
 0)    bash-939    | # 1008.000 us |  kernel_clone();
 3)    bash-939    | # 1023.391 us |  kernel_clone();
 4)    bash-939    | # 1033.008 us |  kernel_clone();
 4)    bash-939    | ! 949.072 us  |  kernel_clone();
 4)    bash-939    | # 1027.990 us |  kernel_clone();
 4)    bash-939    | ! 954.678 us  |  kernel_clone();
 4)    bash-939    | ! 996.557 us  |  kernel_clone();

Without that option, function graph does no show what process is being
recorded (except at sched switch)

Can you add this patch to the test and see if it works again?

-- Steve

diff --git a/tools/testing/selftests/ftrace/test.d/ftrace/func-filter-pid.tc b/tools/testing/selftests/ftrace/test.d/ftrace/func-filter-pid.tc
index c6fc9d31a496..8dcce001881d 100644
--- a/tools/testing/selftests/ftrace/test.d/ftrace/func-filter-pid.tc
+++ b/tools/testing/selftests/ftrace/test.d/ftrace/func-filter-pid.tc
@@ -8,6 +8,7 @@
 # Also test it on an instance directory
 
 do_function_fork=1
+do_funcgraph_proc=1
 
 if [ ! -f options/function-fork ]; then
     do_function_fork=0
@@ -28,6 +29,7 @@ fi
 
 if [ $do_funcgraph_proc -eq 1 ]; then
     orig_value2=`cat options/funcgraph-proc`
+    echo 1 > options/funcgraph-proc
 fi
 
 do_reset() {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ