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:	Wed, 17 Jun 2015 17:15:57 +0200 (CEST)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	Andy Lutomirski <luto@...capital.net>
cc:	Dan Williams <dan.j.williams@...el.com>,
	Arnd Bergmann <arnd@...db.de>, Ingo Molnar <mingo@...hat.com>,
	Borislav Petkov <bp@...en8.de>,
	"H. Peter Anvin" <hpa@...or.com>,
	Ross Zwisler <ross.zwisler@...ux.intel.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Juergen Gross <jgross@...e.com>, X86 ML <x86@...nel.org>,
	Toshi Kani <toshi.kani@...com>,
	linux-nvdimm <linux-nvdimm@...1.01.org>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Luis Rodriguez <mcgrof@...e.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Stefan Bader <stefan.bader@...onical.com>,
	"linux-mm@...ck.org" <linux-mm@...ck.org>,
	Geert Uytterhoeven <geert@...ux-m68k.org>,
	Ralf Baechle <ralf@...ux-mips.org>,
	Henrique de Moraes Holschuh <hmh@....eng.br>,
	Michael Ellerman <mpe@...erman.id.au>,
	Tejun Heo <tj@...nel.org>, Paul Mackerras <paulus@...ba.org>,
	Christoph Hellwig <hch@....de>
Subject: Re: [PATCH v4 6/6] arch, x86: pmem api for ensuring durability of
 persistent memory updates

On Wed, 17 Jun 2015, Andy Lutomirski wrote:
> On Thu, Jun 11, 2015 at 2:19 PM, Dan Williams <dan.j.williams@...el.com> wrote:
> > +static inline void arch_sync_pmem(void)
> > +{
> > +       wmb();
> > +       pcommit_sfence();
> > +}
> 
> This function is non-intuitive to me.  It's really "arch-specific sync
> pmem after one or more copies using arch_memcpy_to_pmem".  If normal
> stores or memcpy to non-WC memory is used instead, then it's
> insufficient if the memory is WB and it's unnecessarily slow if the
> memory is WT or UC (the first sfence isn't needed).
> 
> I would change the name and add documentation.  I'd also add a comment
> about the wmb() being an SFENCE to flush pending non-temporal writes.

Not "I'd also add ...".

Documentation of memory barriers are mandatory.

Thanks,

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