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  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:	Fri, 23 May 2008 17:42:35 -0700
From:	"Michael Chan" <>
To:	"Roland Dreier" <>
cc:	"David Miller" <>,,, netdev <>,,
Subject: Re: [PATCH 2/3] cnic: Add CNIC driver.

On Fri, 2008-05-23 at 13:14 -0700, Roland Dreier wrote:
>  > +		/* Tell compiler that status_blk fields can change. */
>  > +		barrier();
>  > +		if (status_idx != sblk->status_idx) {
> Is a compiler barrier sufficient here?  It seems an out-of-order CPU
> could still mess things up, so an rmb() or smp_rmb() would be required.

The purpose of this compiler barrier is to make sure that the compiled
code will get the sblk->status_idx from memory which may change if the
chip DMAs a new status_idx.

This code is inside a while loop, so it is possible that the compiler
can optimize it to not load status_idx from memory.


To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to
More majordomo info at

Powered by blists - more mailing lists