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:	Tue, 19 Nov 2013 21:39:23 -0700
From:	David Ahern <dsahern@...il.com>
To:	Peter Zijlstra <peterz@...radead.org>
CC:	Ingo Molnar <mingo@...nel.org>, acme@...stprotocols.net,
	linux-kernel@...r.kernel.org,
	Frederic Weisbecker <fweisbec@...il.com>,
	Jiri Olsa <jolsa@...hat.com>,
	Namhyung Kim <namhyung@...nel.org>,
	Mike Galbraith <efault@....de>,
	Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH] perf record: Delete file if a failure occurs writing
 the perf data file

On 11/12/13, 8:34 AM, Peter Zijlstra wrote:
> On Tue, Nov 12, 2013 at 08:25:02AM -0700, David Ahern wrote:
>> The patch in this thread deletes the file. Another option is to rewind the
>> file to the last known good write (ie., length after last successful call to
>> write_output).
>
> I'd report a warning and continue with all events that you could read
> upto that point.
>

Coming back to this: the answer to that statement is known. The attached 
patch attempt to rewind to the last good write. Subsequent reads to the 
file fail with:

WARNING: The /tmp/mnt/perf.data file's data size field is 0 which is 
unexpected.
Was the 'perf record' command properly terminated?
reading input file (size expected=3 received=-1)broken or missing trace data
incompatible file format (rerun with -v to learn more)


Given that it would seem deleting the file is the best option.

David

View attachment "record-reset-on-fail.patch" of type "text/plain" (899 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ