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]
Message-Id: <1211656774.18130.198.camel@localhost.localdomain>
Date:	Sat, 24 May 2008 12:19:34 -0700
From:	Daniel Walker <dwalker@...sta.com>
To:	Thomas Gleixner <tglx@...utronix.de>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/3] futex: fix miss ordered wakeups


On Sat, 2008-05-24 at 20:35 +0200, Thomas Gleixner wrote: 
> > > A) A task on another CPU can get it independent of its priority
> > > B) In case of multiple waiters wakeup there is no guarantee either
> > 
> > This is how I would imagine the pre-plist code would work.
> 
> And it works this way even after the plist code.
> 
> May I politely suggest, that you carefully read futex_wake() and the
> corresponding libc implementation and figure out why there is no
> guarantee and why there can't be one?

Sure ..

> Sorry, I'm not abusive. You make claims about correctness and you seem
> to believe that the plist code gives guarantees except for the
> setscheduler corner case, but your hypothesis is simply wrong:
> 
> There is no kernel side controlled handover of a normal futex. The
> woken up waiters race for it and a low prio thread on another CPU can
> steal it even if there is a high prio waiter woken up.

After reading futex_wake, Doesn't it depend how many waiters are woken?
Given that comes from userspace, glibc could wake a single waiter and
obtain a priority ordering, couldn't it?

> The plist add on works correct in most of the cases, nothing else. To
> achieve full correctness there is much more necessary than this
> setscheduler issue. The plist changes were accepted because the
> overhead is really minimal, but achieving full correctness would hurt
> performance badly.

If that's the requirement then code that cleans up the corner case that
I've identified, which is also minimal should be acceptable .. Since
it's meeting the same requirement you layed out above for the original
plist changes.

Daniel

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