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]
Date:	Mon, 8 Aug 2016 16:34:45 -0300
From:	Arnaldo Carvalho de Melo <acme@...nel.org>
To:	Masami Hiramatsu <mhiramat@...nel.org>
Cc:	Konstantin Khlebnikov <khlebnikov@...dex-team.ru>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] perf probe: fix module name matching

Em Sat, Aug 06, 2016 at 07:30:45PM +0900, Masami Hiramatsu escreveu:
> On Fri, 05 Aug 2016 15:22:36 +0300
> Konstantin Khlebnikov <khlebnikov@...dex-team.ru> wrote:
> 
> > If module is "module" then dso->short_name is "[module]".
> > Substring comparing is't enough: "raid10" matches to "[raid1]".
> > This patch also checks terminating zero in module name.
> > 
> > Signed-off-by: Konstantin Khlebnikov <khlebnikov@...dex-team.ru>
> 
> Looks good to me :)
> 
> Acked-by: Masami Hiramatsu <mhiramat@...nel.org>

Ok, nevermind that other message, I hadn't seen this one, thanks!
 
> Thanks!
> 
> > ---
> >  tools/perf/util/probe-event.c |    4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
> > index 953dc1ab2ed7..dd2d60ef05d3 100644
> > --- a/tools/perf/util/probe-event.c
> > +++ b/tools/perf/util/probe-event.c
> > @@ -170,8 +170,10 @@ static struct map *kernel_get_module_map(const char *module)
> >  		module = "kernel";
> >  
> >  	for (pos = maps__first(maps); pos; pos = map__next(pos)) {
> > +		/* short_name is "[module]" */
> >  		if (strncmp(pos->dso->short_name + 1, module,
> > -			    pos->dso->short_name_len - 2) == 0) {
> > +			    pos->dso->short_name_len - 2) == 0 &&
> > +		    module[pos->dso->short_name_len - 2] == '\0') {
> >  			return pos;
> >  		}
> >  	}
> > 
> 
> 
> -- 
> Masami Hiramatsu <mhiramat@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ