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:	Tue, 9 Sep 2014 10:44:36 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Cc:	Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org,
	Robert Richter <rric@...nel.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Mike Galbraith <efault@....de>,
	Paul Mackerras <paulus@...ba.org>,
	Stephane Eranian <eranian@...gle.com>,
	Andi Kleen <ak@...ux.intel.com>, kan.liang@...el.com
Subject: Re: [PATCH v4 09/22] perf: Support overwrite mode for AUX area

On Wed, Aug 20, 2014 at 03:36:06PM +0300, Alexander Shishkin wrote:

> diff --git a/kernel/events/ring_buffer.c b/kernel/events/ring_buffer.c
> index 925f369947..5006caba63 100644
> --- a/kernel/events/ring_buffer.c
> +++ b/kernel/events/ring_buffer.c

> @@ -294,9 +295,22 @@ void perf_aux_output_end(struct perf_output_handle *handle, unsigned long size,
>  			 bool truncated)
>  {
>  	struct ring_buffer *rb = handle->rb;
> +	unsigned long aux_head;
>  
> +	aux_head = local_read(&rb->aux_head);
> +
> +	if (rb->aux_overwrite) {
> +		local_set(&rb->aux_head, size);
> +
> +		/*
> +		 * Send a RECORD_AUX with size==0 to communicate aux_head
> +		 * of this snapshot to userspace
> +		 */
> +		perf_event_aux_event(handle->event, size, 0, truncated);

Humm.. why not write a 'normal' AUX record?

Also, you didn't mention this in your Changelog _at_all_.

> +	} else {
> +		local_add(size, &rb->aux_head);
> +		perf_event_aux_event(handle->event, aux_head, size, truncated);
> +	}
>  
>  	smp_wmb();
>  	rb->user_page->aux_head = local_read(&rb->aux_head);

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ