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: <20160220195722.GG3522@linux.vnet.ibm.com>
Date:	Sat, 20 Feb 2016 11:57:22 -0800
From:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:	SeongJae Park <sj38.park@...il.com>
Cc:	corbet@....net, dhowells@...hat.com, linux-doc@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Documentation/memory-barriers: fix wrong comment in
 example

On Sat, Feb 20, 2016 at 03:01:08PM +0900, SeongJae Park wrote:
> There is wrong comment in example for compiler store omit behavior.  It
> shows example of the problem and than problem solved version code.
> However, the comment in the solved version is still same with not solved
> version.  Fix the wrong statement with this commit.
> 
> Signed-off-by: SeongJae Park <sj38.park@...il.com>

Hmmm...  The code between the two stores of zero to "a" is intended to
remain the same in the broken and fixed versions.  So the only change
is from "a = 0" to "WRITE_ONCE(a, 0)".  Note that it is some other
CPU that did the third store to "a".

Or am I missing your point here?

							Thanx, Paul

> ---
>  Documentation/memory-barriers.txt | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Documentation/memory-barriers.txt b/Documentation/memory-barriers.txt
> index 061ff29..b4754c7 100644
> --- a/Documentation/memory-barriers.txt
> +++ b/Documentation/memory-barriers.txt
> @@ -1471,7 +1471,7 @@ of optimizations:
>       wrong guess:
> 
>  	WRITE_ONCE(a, 0);
> -	/* Code that does not store to variable a. */
> +	/* Code that does store to variable a. */
>  	WRITE_ONCE(a, 0);
> 
>   (*) The compiler is within its rights to reorder memory accesses unless
> -- 
> 1.9.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ