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: <20180727174307.33990e4f@gandalf.local.home>
Date:   Fri, 27 Jul 2018 17:43:07 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Masami Hiramatsu <mhiramat@...nel.org>
Cc:     Francis Deslauriers <francis.deslauriers@...icios.com>,
        peterz@...radead.org, mathieu.desnoyers@...icios.com,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 3/3] selftests/ftrace: Fix kprobe string testcase to
 not probe notrace function

On Thu, 26 Jul 2018 14:54:23 +0900
Masami Hiramatsu <mhiramat@...nel.org> wrote:

> Fix kprobe string argument testcase to not probe notrace
> function. Instead, it probes tracefs function which must
> be available with ftrace.

Hi Masami,

With these patches applied, this test fails:

 ./ftracetest  test.d/kprobe/probepoint.tc

Gives me the error in dmseg:

  trace_kprobe: Could not probe notrace function create_trace_kprobe

Is this expected? I don't see create_trace_kprobe as a notrace function
either.

I even applied patch 3 (going through Shuah's tree) to me test and it
still fails.

Config attached.

-- Steve

> 
> Signed-off-by: Masami Hiramatsu <mhiramat@...nel.org>
> ---
>  .../ftrace/test.d/kprobe/kprobe_args_string.tc     |   30 ++++++++------------
>  1 file changed, 12 insertions(+), 18 deletions(-)
> 
> diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_string.tc b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_string.tc
> index a0002563e9ee..1ad70cdaf442 100644
> --- a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_string.tc
> +++ b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_string.tc
> @@ -9,28 +9,22 @@ echo > kprobe_events
>  
>  case `uname -m` in
>  x86_64)
> -  ARG2=%si
> -  OFFS=8
> +  ARG1=%di
>  ;;
>  i[3456]86)
> -  ARG2=%cx
> -  OFFS=4
> +  ARG1=%ax
>  ;;
>  aarch64)
> -  ARG2=%x1
> -  OFFS=8
> +  ARG1=%x0
>  ;;
>  arm*)
> -  ARG2=%r1
> -  OFFS=4
> +  ARG1=%r0
>  ;;
>  ppc64*)
> -  ARG2=%r4
> -  OFFS=8
> +  ARG1=%r3
>  ;;
>  ppc*)
> -  ARG2=%r4
> -  OFFS=4
> +  ARG1=%r3
>  ;;
>  *)
>    echo "Please implement other architecture here"
> @@ -38,17 +32,17 @@ ppc*)
>  esac
>  
>  : "Test get argument (1)"
> -echo "p:testprobe create_trace_kprobe arg1=+0(+0(${ARG2})):string" > kprobe_events
> +echo "p:testprobe tracefs_create_dir arg1=+0(${ARG1}):string" > kprobe_events
>  echo 1 > events/kprobes/testprobe/enable
> -! echo test >> kprobe_events
> -tail -n 1 trace | grep -qe "testprobe.* arg1=\"test\""
> +echo "p:test _do_fork" >> kprobe_events
> +grep -qe "testprobe.* arg1=\"test\"" trace
>  
>  echo 0 > events/kprobes/testprobe/enable
>  : "Test get argument (2)"
> -echo "p:testprobe create_trace_kprobe arg1=+0(+0(${ARG2})):string arg2=+0(+${OFFS}(${ARG2})):string" > kprobe_events
> +echo "p:testprobe tracefs_create_dir arg1=+0(${ARG1}):string arg2=+0(${ARG1}):string" > kprobe_events
>  echo 1 > events/kprobes/testprobe/enable
> -! echo test1 test2 >> kprobe_events
> -tail -n 1 trace | grep -qe "testprobe.* arg1=\"test1\" arg2=\"test2\""
> +echo "p:test _do_fork" >> kprobe_events
> +grep -qe "testprobe.* arg1=\"test\" arg2=\"test\"" trace
>  
>  echo 0 > events/enable
>  echo > kprobe_events


Download attachment "config" of type "application/octet-stream" (132841 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ