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: <545AE723.8000900@hitachi.com>
Date:	Thu, 06 Nov 2014 12:12:35 +0900
From:	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
To:	Namhyung Kim <namhyung@...nel.org>
Cc:	Steven Rostedt <rostedt@...dmis.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Namhyung Kim <namhyung.kim@....com>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 2/3] ftracetest: Clear trace buffer after running kprobe
 testcases

(2014/11/06 11:04), Namhyung Kim wrote:
> The kprobe testcases create, use and delete dynamic events during the
> test but didn't clear the trace buffer so it'll leave the result after
> it finishes.
> 
>   # ./ftracetest
>   ...
> 
>   # cat trace
>   # tracer: nop
>   #
>   # entries-in-buffer/entries-written: 2/2   #P:12
>   #
>   #                              _-----=> irqs-off
>   #                             / _----=> need-resched
>   #                            | / _---=> hardirq/softirq
>   #                            || / _--=> preempt-depth
>   #                            ||| /     delay
>   #           TASK-PID   CPU#  ||||    TIMESTAMP  FUNCTION
>   #              | |       |   ||||       |         |
>         ftracetest-26474 [009] d..1 79417.143782: Unknown type 1099
>         ftracetest-26498 [009] d..1 79417.208034: Unknown type 1101
> 
> Signed-off-by: Namhyung Kim <namhyung@...nel.org>

Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>

Thank you!

> ---
>  tools/testing/selftests/ftrace/test.d/kprobe/add_and_remove.tc | 1 +
>  tools/testing/selftests/ftrace/test.d/kprobe/busy_check.tc     | 1 +
>  tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args.tc    | 1 +
>  tools/testing/selftests/ftrace/test.d/kprobe/kretprobe_args.tc | 1 +
>  4 files changed, 4 insertions(+)
> 
> diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/add_and_remove.tc b/tools/testing/selftests/ftrace/test.d/kprobe/add_and_remove.tc
> index 1b8b665ab2b3..a5a426211129 100644
> --- a/tools/testing/selftests/ftrace/test.d/kprobe/add_and_remove.tc
> +++ b/tools/testing/selftests/ftrace/test.d/kprobe/add_and_remove.tc
> @@ -9,3 +9,4 @@ echo p:myevent do_fork > kprobe_events
>  grep myevent kprobe_events
>  test -d events/kprobes/myevent
>  echo > kprobe_events
> +clear_trace
> diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/busy_check.tc b/tools/testing/selftests/ftrace/test.d/kprobe/busy_check.tc
> index b55c84003587..d8c7bb6581fe 100644
> --- a/tools/testing/selftests/ftrace/test.d/kprobe/busy_check.tc
> +++ b/tools/testing/selftests/ftrace/test.d/kprobe/busy_check.tc
> @@ -11,3 +11,4 @@ echo 1 > events/kprobes/myevent/enable
>  echo > kprobe_events && exit 1 # this must fail
>  echo 0 > events/kprobes/myevent/enable
>  echo > kprobe_events # this must succeed
> +clear_trace
> diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args.tc b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args.tc
> index a603d3f8db7b..c45ee2761354 100644
> --- a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args.tc
> +++ b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args.tc
> @@ -12,5 +12,6 @@ echo 1 > events/kprobes/testprobe/enable
>  ( echo "forked")
>  echo 0 > events/kprobes/testprobe/enable
>  echo "-:testprobe" >> kprobe_events
> +clear_trace
>  test -d events/kprobes/testprobe && exit 1 || exit 0
>  
> diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/kretprobe_args.tc b/tools/testing/selftests/ftrace/test.d/kprobe/kretprobe_args.tc
> index 283c29e7f7c4..31717985acc7 100644
> --- a/tools/testing/selftests/ftrace/test.d/kprobe/kretprobe_args.tc
> +++ b/tools/testing/selftests/ftrace/test.d/kprobe/kretprobe_args.tc
> @@ -12,4 +12,5 @@ echo 1 > events/kprobes/testprobe2/enable
>  ( echo "forked")
>  echo 0 > events/kprobes/testprobe2/enable
>  echo '-:testprobe2' >> kprobe_events
> +clear_trace
>  test -d events/kprobes/testprobe2 && exit 1 || exit 0
> 


-- 
Masami HIRAMATSU
Software Platform Research Dept. Linux Technology Research Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@...achi.com


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ