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.LFD.2.00.1005171314590.4195@i5.linux-foundation.org>
Date:	Mon, 17 May 2010 13:20:51 -0700 (PDT)
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Jamie Lokier <jamie@...reable.org>
cc:	Anton Blanchard <anton@...ba.org>, akpm@...ux-foundation.org,
	willy@...ux.intel.com, benh@...nel.crashing.org, paulus@...ba.org,
	linux-arch@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2]: atomic_t: Remove volatile from atomic_t
 definition



On Mon, 17 May 2010, Jamie Lokier wrote:
> 
> I wonder if
> 
>    extern unsigned long __nv_jiffies;
>    #define jiffies (*(volatile unsigned long *)*__nv_jiffies)
> 
> would improve any code in the same way as this atomic_t change.

We effectively already do that. The full 64-bit jiffies isn't volatile. 
But for legacy reasons, we have that "word-sized subpart" of the full 
counter that is volatile - and we're using linker tricks rather the the C 
preprocessor to do the above thing.

So no, there's no room for improvement for jiffies - the only people who 
ever use the volatile jiffies are things that read it. There are no 
initializers that matter, and the updates (which also tend to suck with 
"volatile" because gcc just doesn't do even the obvious optimizations) are 
all done locked and to the non-volatile jiffies_64.

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