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: <20100520134356.GA10080@nowhere>
Date:	Thu, 20 May 2010 15:43:58 +0200
From:	Frederic Weisbecker <fweisbec@...il.com>
To:	Pekka Enberg <penberg@...helsinki.fi>
Cc:	mingo@...hat.com, hpa@...or.com, acme@...hat.com, paulus@...ba.org,
	linux-kernel@...r.kernel.org, tzanussi@...il.com,
	a.p.zijlstra@...llo.nl, tglx@...utronix.de, mingo@...e.hu,
	linux-tip-commits@...r.kernel.org
Subject: Re: [tip:perf/core] perf: Use read() instead of lseek() in
	trace_event_read.c:skip()

On Thu, May 20, 2010 at 04:39:37PM +0300, Pekka Enberg wrote:
> On Thu, May 20, 2010 at 3:54 PM, tip-bot for Tom Zanussi
> <tzanussi@...il.com> wrote:
> > Commit-ID:  cbb5cf7ff6b298beacfe23db3386335b0b9c0a2d
> > Gitweb:     http://git.kernel.org/tip/cbb5cf7ff6b298beacfe23db3386335b0b9c0a2d
> > Author:     Tom Zanussi <tzanussi@...il.com>
> > AuthorDate: Tue, 4 May 2010 23:02:10 -0500
> > Committer:  Frederic Weisbecker <fweisbec@...il.com>
> > CommitDate: Thu, 20 May 2010 08:37:17 +0200
> >
> > perf: Use read() instead of lseek() in trace_event_read.c:skip()
> >
> > This is a small fix for a problem affecting live-mode, introduced
> > recently:
> >
> > root@...picana:~# perf trace rwtop
> > perf trace started with Perl
> > script /root/libexec/perf-core/scripts/perl/rwtop.pl
> >
> >  Fatal: did not read header event
> >
> > commit d00a47cce569a3e660a8c9de5d57af28d6a9f0f7 added a skip()
> > function to skip over e.g. header_page, but this doesn't work for
> > live mode.  This patch re-implements skip() to use read() instead of
> > lseek() to fix that.
> 
> Out of curiosity: why doesn't lseek() work and why can't we fix that?


Because depending on the mode we are, that may or may not work.

We have the normal mode, when the input in a regular file (perf.data)
where it works. And we have the pipe mode, where the seek fails.

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