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, 9 Sep 2014 13:28:18 +0100
From:	Will Deacon <will.deacon@....com>
To:	Daniel Thompson <daniel.thompson@...aro.org>
Cc:	Arnd Bergmann <arnd@...db.de>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"patches@...aro.org" <patches@...aro.org>,
	"linaro-kernel@...ts.linaro.org" <linaro-kernel@...ts.linaro.org>,
	"linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>
Subject: Re: [PATCH] asm-generic/io.h: Implement read[bwlq]_relaxed()

Hi Daniel,

On Tue, Sep 09, 2014 at 01:12:40PM +0100, Daniel Thompson wrote:
> Currently the read[bwlq]_relaxed() family are implemented on every
> architecture except blackfin, m68k[1], metag, openrisc, s390[2] and
> score. Increasingly drivers are being optimized to exploit relaxed
> reads putting these architectures at risk of compilation failures for
> shared drivers.
> 
> This patch addresses this by providing implementations of
> read[bwlq]_relaxed() that are identical to the equivalent read[bwlq]().
> All the above architectures include asm-generic/io.h .
> 
> Note that currently only eight architectures (alpha, arm, arm64, avr32,
> hexagon, microblaze, mips and sh) implement write[bwlq]_relaxed() meaning
> these functions are deliberately not included in this patch.
> 
> [1] m68k includes the relaxed family only when configured *without* MMU.
> [2] s390 requires CONFIG_PCI to include the relaxed family.
> 
> Signed-off-by: Daniel Thompson <daniel.thompson@...aro.org>
> Cc: Will Deacon <will.deacon@....com>
> Cc: Arnd Bergmann <arnd@...db.de>
> Cc: linux-arch@...r.kernel.org
> ---
>  include/asm-generic/io.h | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)

I have a larger series adding these (and the write equivalents) to all
architectures that I periodically post and then fail to get on top of.

The key part you're missing is defining some generic semantics for these
accessors. Without those, I don't think it makes sense to put them into
asm-generic, because drivers can't safely infer any meaning from the relaxed
definition.

Ben and I agreed on something back in May:

  https://lkml.org/lkml/2014/5/22/468

but I need to send a new version including:

  - ioreadX_relaxed and iowriteX_relaxed
  - Strengthening non-relaxed I/O accessors on architectures with non-empty
    mmiowb()

I'll bump it up the list. In the meantime, you can have a look at my io
branch on kernel.org

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