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:	Wed, 9 Sep 2015 13:06:40 -0300
From:	Arnaldo Carvalho de Melo <acme@...nel.org>
To:	Kan Liang <kan.liang@...el.com>, Jiri Olsa <jolsa@...hat.com>
Cc:	"Wangnan (F)" <wangnan0@...wei.com>, linux-kernel@...r.kernel.org,
	lizefan@...wei.com, pi3orama@....com,
	Adrian Hunter <adrian.hunter@...el.com>,
	Andi Kleen <ak@...ux.intel.com>, Jiri Olsa <jolsa@...nel.org>,
	Namhyung Kim <namhyung@...nel.org>,
	Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH] perf report: Fix invalid memory accessing

Em Tue, Sep 08, 2015 at 01:35:10PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Tue, Sep 08, 2015 at 01:13:59PM -0300, Arnaldo Carvalho de Melo escreveu:
> > Em Tue, Sep 08, 2015 at 12:58:31PM -0300, Arnaldo Carvalho de Melo escreveu:
> > > Right now we don't have that much use for the other fields in
> > > 'perf_env', just for the CPU topology information, that we will set in
> > > addr_location for each sample, but we can have uses for that later,
> > > think about a TUI interface for 'perf trace' where we will show what was
> > > the command line, etc.

> > Argh, so in the patch introducing this al.socket thing it would first
> > parse the value from the current system, reading sysfs, etc, then, in
> > the 'report' case it would just throw this information away:

> > -       /* read socket id from perf.data for perf report */
> > -       al.socket = env->cpu[al.cpu].socket_id;

> > We really should do this in perf_event__preprocess_sample() and read the
> > topology information just once, probably using the same routine that
> > creates the perf.data file env record.
 
> Lunch break, but I'll continue the work I started at
> https://git.kernel.org/cgit/linux/kernel/git/acme/linux.git/commit/?h=tmp.perf/core

Ok, I have them at my perf/env branch:

https://git.kernel.org/cgit/linux/kernel/git/acme/linux.git/commit/?h=perf/env

    12  eefb0dbb1aa9 perf evsel: Remove forward declaration of 'struct perf_evlist'
    11  8d9c09de8465 Revert "perf evsel: Add a backpointer to the evlist a evsel is in"
    10  e3611f9dbced perf report: Do not blindly use env->cpu[al.cpu].socket_id
     9  6f9ad1cd48e8 perf event: Use machine->env to find the cpu -> socket mapping
     8  7b157d3eb7b4 perf machine: Add pointer to sample's environment
     7  cc393318b0c0 perf hists browser: Fixup the "cpu" column width calculation
     6  bc413472a275 perf top: Cache the cpu topology info when "-s socket" is used
     5  908f1939ad52 perf sort: Set flag stating if the "socket" key is being used
     4  81956a8be745 perf env: Introduce read_cpu_topology_map() method
     3  7d76ec2a6f18 perf env: Adopt perf_header__set_cmdline
     2  371495478108 perf env: Rename some leftovers from rename to perf_env
     1  7b1a26d8cff7 perf env: Move perf_env out of header.h and session.c into separate object

Now I see that one more probably is needed, the one adding the ->env
backpointer to struct evlist.

The ones fixing the problem are #9 and #10, the rest is infrastructure needed
for those fixes to work, and some are not strictly needed but as I was working
on it, couldn't resist cleaning up.

I'll test this some more, add one or more cleanups and post for review, if all
goes well, tomorrow I'll push it to Ingo.

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