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: <20190301001251.287316650886276b920448af@kernel.org>
Date:   Fri, 1 Mar 2019 00:12:51 +0900
From:   Masami Hiramatsu <mhiramat@...nel.org>
To:     Masami Hiramatsu <mhiramat@...nel.org>,
        Shuah Khan <shuah@...nel.org>
Cc:     Steven Rostedt <rostedt@...dmis.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        linux-kernel@...r.kernel.org,
        Andy Lutomirski <luto@...capital.net>,
        Ingo Molnar <mingo@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Changbin Du <changbin.du@...il.com>,
        Jann Horn <jannh@...gle.com>,
        Kees Cook <keescook@...omium.org>,
        Andy Lutomirski <luto@...nel.org>,
        Alexei Starovoitov <alexei.starovoitov@...il.com>,
        Nadav Amit <namit@...are.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Joel Fernandes <joel@...lfernandes.org>
Subject: Re: [PATCH v4 6/6] selftests/ftrace: Add user-memory access syntax
 testcase

Hi,

Oops, I forgot to Cc Shuah.
I'll update a bit this series and send v5.

Thanks,

On Thu, 28 Feb 2019 21:33:00 +0900
Masami Hiramatsu <mhiramat@...nel.org> wrote:

> Add a user-memory access syntax testcase which checks
> new user-memory access syntax and ustring type.
> 
> Signed-off-by: Masami Hiramatsu <mhiramat@...nel.org>
> ---
>  .../ftrace/test.d/kprobe/kprobe_args_user.tc       |   31 ++++++++++++++++++++
>  1 file changed, 31 insertions(+)
>  create mode 100644 tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_user.tc
> 
> diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_user.tc b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_user.tc
> new file mode 100644
> index 000000000000..996da9d1eec5
> --- /dev/null
> +++ b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_user.tc
> @@ -0,0 +1,31 @@
> +#!/bin/sh
> +# SPDX-License-Identifier: GPL-2.0
> +# description: Kprobe event user-memory access
> +
> +[ -f kprobe_events ] || exit_unsupported # this is configurable
> +
> +grep -A10 "fetcharg:" README | grep -q 'ustring' || exit_unsupported
> +grep -A10 "fetcharg:" README | grep -q '\[u\]<offset>' || exit_unsupported
> +
> +:;: "user-memory access syntax and ustring working on user memory";:
> +echo 'p:myevent do_sys_open path=+0($arg2):ustring path2=+u0($arg2):string' \
> +	> kprobe_events
> +
> +grep myevent kprobe_events | \
> +	grep -q 'path=+0($arg2):ustring path2=+u0($arg2):string'
> +echo 1 > events/kprobes/myevent/enable
> +echo > /dev/null
> +echo 0 > events/kprobes/myevent/enable
> +
> +grep myevent trace | grep -q 'path="/dev/null" path2="/dev/null"'
> +
> +:;: "user-memory access syntax and ustring not working with kernel memory";:
> +echo 'p:myevent vfs_symlink path=+0($arg3):ustring path2=+u0($arg3):string' \
> +	> kprobe_events
> +echo 1 > events/kprobes/myevent/enable
> +ln -s foo $TMPDIR/bar
> +echo 0 > events/kprobes/myevent/enable
> +
> +grep myevent trace | grep -q 'path=(fault) path2=(fault)'
> +
> +exit 0
> 


-- 
Masami Hiramatsu <mhiramat@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ