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:	Thu, 8 Apr 2010 12:27:41 -0300
From:	Arnaldo Carvalho de Melo <acme@...radead.org>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Ingo Molnar <mingo@...e.hu>, linux-kernel@...r.kernel.org,
	Frédéric Weisbecker <fweisbec@...il.com>,
	Mike Galbraith <efault@....de>,
	Paul Mackerras <paulus@...ba.org>
Subject: Re: [PATCH 3/6] perf tools: Reorganize some structs to save space

Em Thu, Apr 08, 2010 at 05:11:49PM +0200, Peter Zijlstra escreveu:
> On Thu, 2010-04-08 at 11:38 -0300, Arnaldo Carvalho de Melo wrote:
> > @@ -68,11 +68,11 @@ struct sample_data {
> >         u64 addr;
> >         u64 id;
> >         u64 stream_id;
> > -       u32 cpu;
> >         u64 period;
> > -       struct ip_callchain *callchain;
> > +       u32 cpu;
> >         u32 raw_size;
> >         void *raw_data;
> > +       struct ip_callchain *callchain;
> >  }; 
> 
> If that is a struct that is to match a kernel produced record then this
> is utterly broken.

No, it is not, it is filled in userspace:

tools/perf/util/event.c:

int event__parse_sample(event_t *event, u64 type, struct sample_data *data)
{
        u64 *array = event->sample.array;

        if (type & PERF_SAMPLE_IP) {
                data->ip = event->ip.ip;
                array++;
        }

        if (type & PERF_SAMPLE_TID) {
                u32 *p = (u32 *)array;
                data->pid = p[0];
                data->tid = p[1];
                array++;
        }

        if (type & PERF_SAMPLE_TIME) {
                data->time = *array;
                array++;
        }
<SNIP>

We can reorder it at will and decoupled from any kernel changes.

- 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