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]
Message-ID: <20111201150151.GA15110@somewhere.redhat.com>
Date:	Thu, 1 Dec 2011 16:01:55 +0100
From:	Frederic Weisbecker <fweisbec@...il.com>
To:	"acme@...hat.com" <acme@...stprotocols.net>
Cc:	Robert Richter <robert.richter@....com>,
	Stephane Eranian <eranian@...gle.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"peterz@...radead.org" <peterz@...radead.org>,
	"dsahern@...il.com" <dsahern@...il.com>,
	"ak@...ux.intel.com" <ak@...ux.intel.com>,
	"mingo@...e.hu" <mingo@...e.hu>
Subject: Re: [PATCH] perf: make perf.data more self-descriptive (v8)

On Wed, Nov 30, 2011 at 02:49:46PM -0200, acme@...hat.com wrote:
> Em Wed, Nov 30, 2011 at 04:08:29PM +0100, Robert Richter escreveu:
> > On 29.11.11 10:35:24, Stephane Eranian wrote:
> > >         sec_start = header->data_offset + header->data_size;
> > >         lseek(fd, sec_start + sec_size, SEEK_SET);
> > > 
> > >         err = do_write_feat(fd, header, HEADER_TRACE_INFO, &p, evlist);
> > >         if (err)
> > >                 goto out_free;
> > > 
> > >         err = do_write_feat(fd, header, HEADER_BUILD_ID, &p, evlist);
> > >         if (err) {
> > >                 perf_header__clear_feat(header, HEADER_BUILD_ID);
> > >                 goto out_free;
> > >         }
> 
> > > The 'clear_feat' is missing for TRACE_INFO, that's all. The question is:
> > > is case do_write_feat(trace_info) fails, is there still a way to parse the file
> > > correctly? If not, then perf should bail out, if yes, then we need to add the
> > > clear_feat(TRACE_INFO) in case of error.
> 
> > The question is, if do_write_feat() fails for HEADER_TRACE_INFO or
> > HEADER_BUILD_ID then perf_header__adds_write() fails. A failure of any
> > other feature simple disables it by calling clear_feat(). I noticed
> > this asymmetry and wonder why?

Not sure either. I must confess I didn't write that fixup part...

> > 
> > Also, is there a reason why HEADER_TRACE_INFO starts with bit 1 instead
> > of bit 0. Is bit 0 reserved for some reason?

Looks like a mistake I made from the beginning. And we can't really fix that
without breaking all perf.data :)
--
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