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:	Thu, 7 Jan 2016 13:39:28 +0100
From:	Jiri Olsa <jolsa@...hat.com>
To:	Namhyung Kim <namhyung@...nel.org>
Cc:	Jiri Olsa <jolsa@...nel.org>,
	Arnaldo Carvalho de Melo <acme@...nel.org>,
	lkml <linux-kernel@...r.kernel.org>,
	David Ahern <dsahern@...il.com>,
	Ingo Molnar <mingo@...nel.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Noel Grandin <noelgrandin@...il.com>,
	Adrian Hunter <adrian.hunter@...el.com>
Subject: [PATCHv2 06/13] perf record: Store data mmaps for dwarf unwind

On Thu, Jan 07, 2016 at 08:12:39PM +0900, Namhyung Kim wrote:
> On Thu, Jan 07, 2016 at 10:14:03AM +0100, Jiri Olsa wrote:
> > Currently we don't synthesize data mmap by default. It depends
> > on -d option, that enables data address sampling.
> > 
> > But we've seen cases (softice) where DWARF unwinder went through
> > non executable mmaps, which we need to lookup in MAP__VARIABLE tree.
> > 
> > Making data mmaps to be synthesized for dwarf unwind as well.
> > 
> > Reported-by: Noel Grandin <noelgrandin@...il.com>
> > Link: http://lkml.kernel.org/n/tip-lh02yir6qfycn8zr892rmlgg@git.kernel.org
> > Signed-off-by: Jiri Olsa <jolsa@...nel.org>
> > ---
> >  tools/perf/builtin-record.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
> > index 9c5cdc2c4471..920b93edb497 100644
> > --- a/tools/perf/builtin-record.c
> > +++ b/tools/perf/builtin-record.c
> > @@ -804,6 +804,7 @@ int record_parse_callchain_opt(const struct option *opt,
> >  	int ret;
> >  	struct record_opts *record = (struct record_opts *)opt->value;
> >  
> > +	record->sample_address = true;
> 
> It seems unconditionally set, no?

ouch, I missed the unset cond down there.. v2 attached

thanks,
jirka


---
Currently we don't synthesize data mmap by default. It depends
on -d option, that enables data address sampling.

But we've seen cases (softice) where DWARF unwinder went through
non executable mmaps, which we need to lookup in MAP__VARIABLE tree.

Making data mmaps to be synthesized for dwarf unwind as well.

Reported-by: Noel Grandin <noelgrandin@...il.com>
Link: http://lkml.kernel.org/n/tip-lh02yir6qfycn8zr892rmlgg@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@...nel.org>
---
 tools/perf/builtin-record.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 9c5cdc2c4471..465bde77f49b 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -815,8 +815,11 @@ int record_parse_callchain_opt(const struct option *opt,
 	}
 
 	ret = parse_callchain_record_opt(arg, &callchain_param);
-	if (!ret)
+	if (!ret) {
+		/* Enable data address sampling for DWARF unwind. */
+		record->sample_address = true;
 		callchain_debug();
+	}
 
 	return ret;
 }
-- 
2.4.3

--
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