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: <20140523144604.GF21319@arm.com>
Date:	Fri, 23 May 2014 15:46:04 +0100
From:	Will Deacon <will.deacon@....com>
To:	"H. Peter Anvin" <hpa@...or.com>
Cc:	"linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"arnd@...db.de" <arnd@...db.de>,
	"monstr@...str.eu" <monstr@...str.eu>,
	"dhowells@...hat.com" <dhowells@...hat.com>,
	"broonie@...aro.org" <broonie@...aro.org>,
	"benh@...nel.crashing.org" <benh@...nel.crashing.org>,
	"peterz@...radead.org" <peterz@...radead.org>,
	"paulmck@...ux.vnet.ibm.com" <paulmck@...ux.vnet.ibm.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>
Subject: Re: [PATCH v2 16/18] x86: io: implement dummy relaxed accessor
 macros for writes

Hi Peter,

On Thu, May 22, 2014 at 06:15:27PM +0100, H. Peter Anvin wrote:
> On 05/22/2014 09:47 AM, Will Deacon wrote:
> > write{b,w,l,q}_relaxed are implemented by some architectures in order to
> > permit memory-mapped I/O accesses with weaker barrier semantics than the
> > non-relaxed variants.
> > 
> > This patch adds dummy macros for the read and write accessors to x86,
> > which simply expand to the non-relaxed variants. Note that this
> > strengthens the relaxed read accessors, since they are now ordered with
> > respect to each other by way of a compiler barrier.
> 
> OK, do we want/need that compiler barrier?  And you say "strengthens" -
> strengthens with respect to what if we didn't have them before?

Actually, x86 does already implement the relaxed read accessors:

	#define readb_relaxed(a) __readb(a)
	#define readw_relaxed(a) __readw(a)
	#define readl_relaxed(a) __readl(a)

where __read* don't have "memory" clobbers, unlike the read* implementations.

I would like the relaxed accessors to be ordered with respect to each other
but, looking again, that is already achieved through the use of volatile asm
so I've come full circle and decided that we don't need the clobbers after
all.

What do you think?

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