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, 11 May 2016 12:41:27 +0300
From:	Alexander Shishkin <alexander.shishkin@...ux.intel.com>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Thomas Gleixner <tglx@...utronix.de>, x86@...nel.org,
	Borislav Petkov <bp@...en8.de>, Ingo Molnar <mingo@...hat.com>,
	linux-kernel@...r.kernel.org, vince@...ter.net, eranian@...gle.com,
	Arnaldo Carvalho de Melo <acme@...radead.org>
Subject: Re: [PATCH 2/2] perf: Disable the event on a truncated AUX record

Peter Zijlstra <peterz@...radead.org> writes:

> On Tue, May 10, 2016 at 04:18:33PM +0300, Alexander Shishkin wrote:
>> When the PMU driver reports a truncated AUX record, it effectively means
>> that there is no more usable room in the event's AUX buffer (even though
>> there may still be some room, so that perf_aux_output_begin() doesn't take
>> action). At this point the consumer still has to be woken up and the event
>> has to be disabled, otherwise the event will just keep spinning between
>> perf_aux_output_begin() and perf_aux_output_end() until its context gets
>> unscheduled.
>> 
>> Again, for cpu-wide events this means never, so once in this condition,
>> they will be forever losing data.
>> 
>> Fix this by disabling the event and waking up the consumer in case of a
>> truncated AUX record.
>
>> +	if (wakeup) {
>> +		if (truncated)
>> +			handle->event->pending_disable = 1;
>> +		perf_output_wakeup(handle);
>> +	}
>
> Does the userspace tool know how to deal with this and re-enable it?

Yes, it knows to ioctl(EVENT_ENABLE). Also, we're already doing the
disabling for the no-room-in-buffer condition in
perf_aux_output_begin().

Regards,
--
Alex

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ