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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 12 Oct 2011 09:09:35 +0200
From:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Manfred Spraul <manfred@...orfullife.com>,
	LKML <linux-kernel@...r.kernel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Mike Galbraith <efault@....de>
Subject: Re: [PATCH 2/3] ipc/sem.c: handle spurious wakeups

On Tue, 2011-10-11 at 14:54 -0700, Andrew Morton wrote:
> On Sat, 24 Sep 2011 19:37:11 +0200
> Manfred Spraul <manfred@...orfullife.com> wrote:
> 
> > semtimedop() does not handle spurious wakeups, it returns -EINTR to user space.
> > Most other schedule() users would just loop and not return to user space.
> > The patch adds such a loop to semtimedop()
> 
> What is a "spurious wakeup" and how can a process receive one?

Its a wakeup unrelated to the condition its waiting for. They shouldn't
happen (often) but all wait loops should deal with them. Sadly of course
most out of core wait loops don't :-(

> I'm wondering about the userspace-visible effects of this change, and
> any compatibility issues?

For this particular case it would be returning to userspace with -EINTR
without a signal having been raised what so ever. Not a big deal as
userspace it supposed to be able to deal with -EINTR and retry.

Also, these spurious wakeups hardly ever happen in the current kernel, I
only noticed it because I made them slightly more likely with a patch
currently on the back-burner until I figure out a sane way to audit all
1400+ schedule() and co. callsites.
--
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