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: <alpine.LNX.1.10.0901140016520.5377@jikos.suse.cz>
Date:	Wed, 14 Jan 2009 00:22:15 +0100 (CET)
From:	Jiri Kosina <jkosina@...e.cz>
To:	Jeremy Fitzhardinge <jeremy@...p.org>, Ingo Molnar <mingo@...e.hu>
cc:	Jeremy Fitzhardinge <jeremy@...source.com>,
	linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
	"H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH] x86: remove byte locks

On Tue, 13 Jan 2009, Jeremy Fitzhardinge wrote:

> My intention for that code was always that it be a simplest-possible 
> reference implementation for the spinlock pvops, and perhaps a basis for 
> a more specialized version (the Xen version is based on byte locks, for 
> example). The code is "dead" in the sense that it has no users, but it 
> also results in no generated code, and should be easy to maintain if the 
> spinlock API is changed (as it is a canary to show that the other 
> implementations will need changing too).  In particular, the "paravirt 
> spinlock" mechanism relies on all implementations using the same static 
> initializer, and I wanted there to be an obvious second implementation 
> so that if someone decided to change the ticketlock initializer, they'd 
> be forced to consider what happens with the bytelock initializer (and by 
> extension, any other implementation).

Why can't this just be somewhere in documentation? (possibly even with the 
byte locks code as a reference).

It is IMHO just totally confusing to have a spinlock implementation that 
is not used at all in the tree. It took me quite some time to go through 
this until I finally figured out that this code is actually never used. 
Currently, on first sight it might seem that byte locks are used whenever 
CONFIG_PARAVIRT is set, which is not true.

And apparently even Linus got confused by this, which also tells us 
something by itself, see [1].

[1] http://marc.info/?l=linux-kernel&m=123144211719754&w=2

-- 
Jiri Kosina
SUSE Labs
--
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