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:	Wed, 03 Aug 2011 13:49:31 +0200
From:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
To:	Greg KH <greg@...ah.com>
Cc:	Vince Weaver <vweaver1@...s.utk.edu>, Ingo Molnar <mingo@...e.hu>,
	Paul Mackerras <paulus@...ba.org>,
	linux-kernel@...r.kernel.org,
	Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
	stable <stable@...nel.org>
Subject: Re: [stable] [perf] overflow/perf_count_sw_cpu_clock crashes
 recent kernels

On Tue, 2011-08-02 at 09:35 -0700, Greg KH wrote:
> On Fri, Jul 29, 2011 at 01:59:10PM +0200, Peter Zijlstra wrote:
> > On Thu, 2011-07-28 at 22:05 -0700, Greg KH wrote:
> > > 
> > > What is that commit id so it can be properly referenced in the patch
> > > below?  And what tree should this patch go into?  .39?  3.0?  Anything
> > > newer? 
> > 
> > .32+ in as far as anybody is still maintaining them, if it fails to
> > apply to any of them (quite possible) do tell and I can provide
> > backports etc..
> 
> I've applied it to 3.0, and it didn't apply to any older kernel due to
> file movements, so if you could, can you provide a version for
> .32-stable?


---
From: Peter Zijlstra <a.p.zijlstra@...llo.nl>

The below patch is for -stable only, upstream has a much larger patch
that contains the below hunk in commit a8b0ca17b80e92faab46ee7179ba9e99ccb61233

Vince found that under certain circumstances software event overflows
go wrong and deadlock. Avoid trying to delete a timer from the timer
callback.

Reported-by: Vince Weaver <vweaver1@...s.utk.edu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@...llo.nl>
---
 kernel/perf_event.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/kernel/perf_event.c b/kernel/perf_event.c
index 183d437..8f97aea 100644
--- a/kernel/perf_event.c
+++ b/kernel/perf_event.c
@@ -3693,12 +3693,8 @@ static int __perf_event_overflow(struct perf_event *event, int nmi,
 	if (events && atomic_dec_and_test(&event->event_limit)) {
 		ret = 1;
 		event->pending_kill = POLL_HUP;
-		if (nmi) {
-			event->pending_disable = 1;
-			perf_pending_queue(&event->pending,
-					   perf_pending_event);
-		} else
-			perf_event_disable(event);
+		event->pending_disable = 1;
+		perf_pending_queue(&event->pending, perf_pending_event);
 	}
 
 	perf_event_output(event, nmi, data, regs);

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