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]
Date:	Thu, 23 Aug 2007 21:05:40 +0100
From:	David Howells <dhowells@...hat.com>
To:	Segher Boessenkool <segher@...nel.crashing.org>
Cc:	dhowells@...hat.com,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Hirokazu Takata <takata@...ux-m32r.org>,
	"Robert P. J. Day" <rpjday@...dspring.com>,
	paulmck@...ux.vnet.ibm.com, linux-kernel@...r.kernel.org,
	"Luck, Tony" <tony.luck@...el.com>, akpm@...ux-foundation.org,
	linux-arch@...r.kernel.org, Chris Snook <csnook@...hat.com>,
	Chris Friesen <cfriesen@...tel.com>
Subject: Re: [PATCH 11/23] make atomic_read() and atomic_set() behavior consistent on m32r

Segher Boessenkool <segher@...nel.crashing.org> wrote:

> This simply isn't true.  The compiler *can* combine asm stuff:
> 
> 
> typedef struct { int counter; } atomic_t;
> 
> static inline __attribute__((pure)) int atomic_read(const atomic_t *v)
> {
>         int x;
>         asm("ld %0,@%1" : "=r"(x) : "r"(&v->counter), "m"(v->counter));
>         return x;
> }

That's not precisely combining asm stuff.  The compiler is ditching a whole
function because you've told it it can cache the result.

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