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, 1 Jun 2011 15:41:47 -0400 (EDT)
From:	Vince Weaver <vweaver1@...s.utk.edu>
To:	mingo@...hat.com, hpa@...or.com, linux-kernel@...r.kernel.org,
	a.p.zijlstra@...llo.nl, tglx@...utronix.de, mingo@...e.hu
Subject: Re: [tip:perf/urgent] perf: Fix SIGIO handling

On Sat, 28 May 2011, tip-bot for Peter Zijlstra wrote:

> Commit-ID:  f506b3dc0ec454a16d40cab9ee5d75435b39dc50
> Gitweb:     http://git.kernel.org/tip/f506b3dc0ec454a16d40cab9ee5d75435b39dc50
> Author:     Peter Zijlstra <a.p.zijlstra@...llo.nl>
> AuthorDate: Thu, 26 May 2011 17:02:53 +0200
> Committer:  Ingo Molnar <mingo@...e.hu>
> CommitDate: Sat, 28 May 2011 17:04:59 +0200
> 
> perf: Fix SIGIO handling
> 
> Vince noticed that unless we mmap() a buffer, SIGIO gets lost. So
> explicitly push the wakeup (including signals) when requested.
> 
> Reported-by: Vince Weaver <vweaver1@...s.utk.edu>
> Signed-off-by: Peter Zijlstra <a.p.zijlstra@...llo.nl>
> Cc: <stable@...nel.org>
> Link: http://lkml.kernel.org/n/tip-2euus3f3x3dyvdk52cjxw8zu@git.kernel.org
> Signed-off-by: Ingo Molnar <mingo@...e.hu>
> ---
>  kernel/events/core.c |    8 ++++++++
>  1 files changed, 8 insertions(+), 0 deletions(-)
> 
> diff --git a/kernel/events/core.c b/kernel/events/core.c
> index c09767f..d863b3c 100644
> --- a/kernel/events/core.c
> +++ b/kernel/events/core.c
> @@ -5028,6 +5028,14 @@ static int __perf_event_overflow(struct perf_event *event, int nmi,
>  	else
>  		perf_event_output(event, nmi, data, regs);
>  
> +	if (event->fasync && event->pending_kill) {
> +		if (nmi) {
> +			event->pending_wakeup = 1;
> +			irq_work_queue(&event->pending);
> +		} else
> +			perf_event_wakeup(event);
> +	}
> +
>  	return ret;
>  }

there is something strange about this commit.  

With it I get many more overflows than expected (on the order of 40x more)
when I am using PERF_IOC_REFRESH,1 to restart the sampled counter
from the end of the signal handler.

Also if you use PERF_IOC_REFRESH with a value other than 1, the value
seems to be ignored and all of the counts are POLL_IN rather than
POLL_HUP as I'd expect.

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