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, 11 Mar 2019 18:23:51 +0900
From:   Masami Hiramatsu <mhiramat@...nel.org>
To:     Arnaldo Carvalho de Melo <acme@...nel.org>
Cc:     Adrian Hunter <adrian.hunter@...el.com>,
        Joseph Qi <joseph.qi@...ux.alibaba.com>,
        Arnaldo Carvalho de Melo <arnaldo.melo@...il.com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Greg KH <gregkh@...uxfoundation.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        luto@...nel.org, Jiufei Xue <jiufei.xue@...ux.alibaba.com>,
        Xu Yu <xuyu@...ux.alibaba.com>, peterz@...radead.org,
        mingo@...hat.com
Subject: Re: [PATCH] perf probe: Fix getting the kernel map

On Fri, 8 Mar 2019 11:39:26 -0300
Arnaldo Carvalho de Melo <acme@...nel.org> wrote:

> Em Mon, Mar 04, 2019 at 03:13:21PM +0200, Adrian Hunter escreveu:
> > Since commit 4d99e4136580 ("perf machine: Workaround missing maps for x86
> > PTI entry trampolines"), perf tools has been creating more than one kernel
> > map, however 'perf probe' assumed there could be only one.
> > 
> > Fix by using machine__kernel_map() to get the main kernel map.
> 
> Masami, can I get your Acked-by?

Yes, this looks good to me :)

Acked-by: Masami Hiramatsu <mhiramat@...nel.org>

Thank you Adrian!

> 
> - Arnaldo
>  
> > Signed-off-by: Adrian Hunter <adrian.hunter@...el.com>
> > Fixes: 4d99e4136580 ("perf machine: Workaround missing maps for x86 PTI entry trampolines")
> > Fixes: d83212d5dd67 ("kallsyms, x86: Export addresses of PTI entry trampolines")
> > Tested-by: Joseph Qi <joseph.qi@...ux.alibaba.com>
> > Cc: stable@...r.kernel.org
> > ---
> >  tools/perf/util/probe-event.c | 6 ++++--
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> > 
> > diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
> > index e86f8be89157..6cd96f9b346d 100644
> > --- a/tools/perf/util/probe-event.c
> > +++ b/tools/perf/util/probe-event.c
> > @@ -157,8 +157,10 @@ static struct map *kernel_get_module_map(const char *module)
> >  	if (module && strchr(module, '/'))
> >  		return dso__new_map(module);
> >  
> > -	if (!module)
> > -		module = "kernel";
> > +	if (!module) {
> > +		pos = machine__kernel_map(host_machine);
> > +		return map__get(pos);
> > +	}
> >  
> >  	for (pos = maps__first(maps); pos; pos = map__next(pos)) {
> >  		/* short_name is "[module]" */
> > -- 
> > 2.19.1
> 
> -- 
> 
> - Arnaldo


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ