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: <3361270.4SkjDs5lox@wuerfel>
Date:	Thu, 25 Sep 2014 17:07:47 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	Will Deacon <will.deacon@....com>
Cc:	"linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"benh@...nel.crashing.org" <benh@...nel.crashing.org>,
	"chris@...kel.net" <chris@...kel.net>,
	"cmetcalf@...era.com" <cmetcalf@...era.com>,
	"davem@...emloft.net" <davem@...emloft.net>,
	"deller@....de" <deller@....de>,
	"dhowells@...hat.com" <dhowells@...hat.com>,
	"geert@...ux-m68k.org" <geert@...ux-m68k.org>,
	"heiko.carstens@...ibm.com" <heiko.carstens@...ibm.com>,
	"hpa@...or.com" <hpa@...or.com>,
	"jcmvbkbc@...il.com" <jcmvbkbc@...il.com>,
	"jesper.nilsson@...s.com" <jesper.nilsson@...s.com>,
	"mingo@...hat.com" <mingo@...hat.com>,
	"monstr@...str.eu" <monstr@...str.eu>,
	"paulmck@...ux.vnet.ibm.com" <paulmck@...ux.vnet.ibm.com>,
	"rdunlap@...radead.org" <rdunlap@...radead.org>,
	"sam@...nborg.org" <sam@...nborg.org>,
	"schwidefsky@...ibm.com" <schwidefsky@...ibm.com>,
	"starvik@...s.com" <starvik@...s.com>,
	"takata@...ux-m32r.org" <takata@...ux-m32r.org>,
	"tglx@...utronix.de" <tglx@...utronix.de>,
	"tony.luck@...el.com" <tony.luck@...el.com>,
	"daniel.thompson@...aro.org" <daniel.thompson@...aro.org>,
	"broonie@...aro.org" <broonie@...aro.org>,
	"linux@....linux.org.uk" <linux@....linux.org.uk>,
	"thierry.reding@...il.com" <thierry.reding@...il.com>
Subject: Re: [PATCH v3 00/17] Cross-architecture definitions of relaxed MMIO accessors

On Thursday 25 September 2014 15:55:38 Will Deacon wrote:
> On Thu, Sep 25, 2014 at 02:15:10PM +0100, Arnd Bergmann wrote:
> > On Wednesday 24 September 2014 18:17:19 Will Deacon wrote:
> > > This is version three of the series I've originally posted here:
> > > 
> > >   v1: https://lkml.org/lkml/2014/4/17/269
> > >   v2: https://lkml.org/lkml/2014/5/22/468
> > > 
> > > This is basically just a rebase on top of 3.17-rc6, minus the alpha patch
> > > (which was merged into mainline).
> > > 
> > > I looked at reworking the non-relaxed accessors to imply mmiowb, but it
> > > quickly got messy as some architectures (e.g. mips) deliberately keep
> > > mmiowb and readX/writeX separate whilst others (e.g. powerpc) don't trust
> > > drivers to get mmiowb correct, so add barriers to both. Given that
> > > arm/arm64/x86 don't care about mmiowb, I've left that as an exercise for
> > > an architecture that does care.
> > > 
> > > In order to get this lot merged, we probably want to merge the asm-generic
> > > patch (1/17) first, so Acks would be much appreciated on the architecture
> > > bits.
> > > 
> > > As before, I've included the original cover letter below, as that describes
> > > what I'm trying to do in more detail.
> > > 
> > 
> > I've now applied the parts of your series that are required to have
> > every architecture provide all the 'relaxed' accessors to the
> > asm-generic tree, on top of Thierry's series.
> 
> Brill, thanks Arnd! I'll repost what's left during the next cycle, however
> I think you also need to pick the microblaze patch as it includes
> <asm-generic/io.h> before defining its relaxed accessors, so I think
> you'll get a redefinition warning from the preprocessor.

Good point, I'll add that on top then.

> > I had to change your first patch significantly because all the context
> > changed in his patches. See below for the new version. Thierry, can
> > you also confirm that this matches up with the intention of your
> > series? Since that now adds a separate #ifdef for each symbol, I
> > ended up putting the #ifdef for the relaxed version inside of the
> > #ifdef for the non-relaxed version, but it could alternatively
> > be defined outside of it as well.
> 
> I think both work, as I can't find any architectures that define the
> relaxed variants but not the non-relaxed versions.

Actually I just made up my mind about that: Architectures are actually
supposed to provide the non-relaxed versions themselves using inline
assembly, but they don't need to provide the relaxed version.

The current version doesn't let you do that, so I'll keel the #ifdef
sections separate. This also means that I won't apply your patch 17:
we will keep needing the #ifdef to support all three relevant combinations:

a) architectures that provide neither and want to get the defaults
   from asm-generic
b) architectures that provide the non-relaxed versions and want tog
   to get just the relaxed version from asm-generic
c) architectures that provide both

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