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, 31 Jan 2012 13:23:39 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Alan Cox <alan@...rguk.ukuu.org.uk>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Hitoshi Mitake <h.mitake@...il.com>,
	Matthew Wilcox <matthew.r.wilcox@...el.com>,
	Roland Dreier <roland@...estorage.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	James Bottomley <James.Bottomley@...allels.com>,
	linux-kernel@...r.kernel.org, hpa@...ux.intel.com
Subject: Re: [PATCH] NVMe: Fix compilation on architecturs without
 readq/writeq


* Alan Cox <alan@...rguk.ukuu.org.uk> wrote:

> On Tue, 31 Jan 2012 13:09:22 +0100
> Ingo Molnar <mingo@...e.hu> wrote:
> 
> > 
> > * Alan Cox <alan@...rguk.ukuu.org.uk> wrote:
> > 
> > > >   u64 val;
> > > >   val = readl(addr);
> > > >   val |= readl(addr+4) << 32;
> > > > 
> > > > is well-defined and must read the low word first - both at the C level
> > > > *and* at the CPU level. Anything else would be a bug in the
> > > > architecture "readl()" implementation or the hardware.
> > > 
> > > That doesn't make the access atomic to hardware however as a true 64bit
> > > readq/writeq would be ?
> > > 
> > > It seems to me the two are not quite the same semantically
> > 
> > Correct, and that's what the:
> > 
> > 	#include <asm/io-inatomic.h>
> > 
> > line in the driver would express.
> 
> Why would "inatomic" indicate that - I'm confused. It would 
> imply to me they were extra specially atomic ?

Yeah, s/inatomic/non-atomic.

inatomic would be doubly confusing for the reason that it's 
already used as an 'in atomic section' sense in the kernel.

> (atomos if from the Greek so in- as a prefix isn't the same 
> in- as in many other words, welcome to English hell - who 
> needs perl)
> 
> non-atomic.h might be better, or 'un-atomic' or 'multi-read' 
> or something ?

non-atomic sounds good to me too.

Thanks,

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