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] [day] [month] [year] [list]
Date:   Fri, 7 Jul 2017 21:39:14 +0530
From:   "Naveen N. Rao" <naveen.n.rao@...ux.vnet.ibm.com>
To:     Masami Hiramatsu <mhiramat@...nel.org>
Cc:     Steven Rostedt <rostedt@...dmis.org>,
        Ananth N Mavinakayanahalli <ananth@...ux.vnet.ibm.com>,
        Michael Ellerman <mpe@...erman.id.au>,
        Shuah Khan <shuah@...nel.org>, linuxppc-dev@...ts.ozlabs.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/4] selftests/ftrace: Add a test to probe module
 functions

On 2017/07/03 12:51PM, Masami Hiramatsu wrote:
> On Mon, 3 Jul 2017 12:27:33 +0900
> Masami Hiramatsu <mhiramat@...nel.org> wrote:
> 
> > On Thu, 29 Jun 2017 19:05:37 +0530
> > "Naveen N. Rao" <naveen.n.rao@...ux.vnet.ibm.com> wrote:
> > 
> > > Add a kprobes test to ensure that we are able to add a probe on a
> > > module function using 'p <mod>:<func>' format, without having to
> > > specify a probe name.
> > > 
> > > Suggested-by: Masami Hiramatsu <mhiramat@...nel.org>
> > > Acked-by: Masami Hiramatsu <mhiramat@...nel.org>
> > > Signed-off-by: Naveen N. Rao <naveen.n.rao@...ux.vnet.ibm.com>
> > > ---
> > >  .../testing/selftests/ftrace/test.d/kprobe/probe_module.tc | 14 ++++++++++++++
> > >  1 file changed, 14 insertions(+)
> > >  create mode 100644 tools/testing/selftests/ftrace/test.d/kprobe/probe_module.tc
> > > 
> > > diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/probe_module.tc b/tools/testing/selftests/ftrace/test.d/kprobe/probe_module.tc
> > > new file mode 100644
> > > index 000000000000..ea7657041ba6
> > > --- /dev/null
> > > +++ b/tools/testing/selftests/ftrace/test.d/kprobe/probe_module.tc
> > > @@ -0,0 +1,14 @@
> > > +#!/bin/sh
> > > +# description: Kprobe dynamic event - probing module
> > > +
> > > +[ -f kprobe_events ] || exit_unsupported # this is configurable
> > > +
> > > +echo 0 > events/enable
> > > +echo > kprobe_events
> > > +export MOD=`lsmod | head -n 2 | tail -n 1 | cut -f1 -d" "`
> > > +export FUNC=`grep -m 1 ".* t .*\\[$MOD\\]" /proc/kallsyms | xargs | cut -f3 -d" "`
> > > +[ "x" != "x$MOD" -a "y" != "y$FUNC" ] || exit_untested
> > 
> > Could you also add below case?
> > 
> > echo p:probe_$MOD/$FUNC $MOD/$FUNC > kprobe_events 
> 
> Oops, it should be something like
> 
> echo "p:test_${MOD}_${FUNC} $MOD/$FUNC" > kprobe_events
> 
> since we would like to avoid adding new group name for it.
> 
> (Adding new group name should be a separated one.)
> 
> Thank you,
> 
> > 
> > This is for "new event with name on module" case, your one is for "new event without name on module (automatic name generation)"
> > 
> > We should have different test case, because those kicks slightly different parts in kprobe tracer.

Sure. Will make changes to the two tests here and re-spin.

Thanks,
Naveen

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ