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:	Tue, 18 Nov 2014 16:48:27 +0000
From:	Will Deacon <will.deacon@....com>
To:	Alexander Duyck <alexander.h.duyck@...hat.com>
Cc:	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Alexander Duyck <alexander.duyck@...il.com>,
	"linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"mathieu.desnoyers@...ymtl.ca" <mathieu.desnoyers@...ymtl.ca>,
	"peterz@...radead.org" <peterz@...radead.org>,
	"heiko.carstens@...ibm.com" <heiko.carstens@...ibm.com>,
	"mingo@...nel.org" <mingo@...nel.org>,
	"mikey@...ling.org" <mikey@...ling.org>,
	"linux@....linux.org.uk" <linux@....linux.org.uk>,
	"donald.c.skidmore@...el.com" <donald.c.skidmore@...el.com>,
	"matthew.vick@...el.com" <matthew.vick@...el.com>,
	"geert@...ux-m68k.org" <geert@...ux-m68k.org>,
	"jeffrey.t.kirsher@...el.com" <jeffrey.t.kirsher@...el.com>,
	"romieu@...zoreil.com" <romieu@...zoreil.com>,
	"paulmck@...ux.vnet.ibm.com" <paulmck@...ux.vnet.ibm.com>,
	"nic_swsd@...ltek.com" <nic_swsd@...ltek.com>,
	"michael@...erman.id.au" <michael@...erman.id.au>,
	"tony.luck@...el.com" <tony.luck@...el.com>,
	"torvalds@...ux-foundation.org" <torvalds@...ux-foundation.org>,
	"oleg@...hat.com" <oleg@...hat.com>,
	"schwidefsky@...ibm.com" <schwidefsky@...ibm.com>,
	"fweisbec@...il.com" <fweisbec@...il.com>,
	"davem@...emloft.net" <davem@...emloft.net>
Subject: Re: [PATCH 2/4] arch: Add lightweight memory barriers fast_rmb() and
 fast_wmb()

On Tue, Nov 18, 2014 at 04:20:46PM +0000, Alexander Duyck wrote:
> On 11/18/2014 03:58 AM, Will Deacon wrote:
> > So actually, this is an interesting case where the barrier would like to
> > know whether the memory returned by dma_alloc_coherent is h/w coherent
> > (normal, cacheable) or s/w coherent (normal, non-cacheable). I think Ben
> > is thinking of the h/w coherent case (i.e. actual snooping into the CPU
> > caches by the DMA master).
> >
> > For the former, we could use inner-shareable barriers. For the latter, we'd
> > need to use outer-shareable barriers.
> >
> > If we can't tell, then these should be dmb(osh), which will work for both.
> >
> 
> Okay, so I will update the ARM portion of my patches to use osh and 
> oshst then since it sounds like I was using too strong of barriers.

Sounds good. Another reason this is interesting is because the native
acquire/release instructions on ARMv8 actually take into account the
shareability domain of the virtual address, so using them would give you
the shareability domain you want but slightly stronger ordering guarantees
within that domain.

Still, either of them will be a damn sight better than the dsb we currently
have courtesy of the mandatory barriers.

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