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: <5113DCC1.7040902@synopsys.com>
Date:	Thu, 7 Feb 2013 20:56:33 +0400
From:	Alexey Brodkin <Alexey.Brodkin@...opsys.com>
To:	Grant Likely <grant.likely@...retlab.ca>
CC:	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Michal Simek <monstr@...str.eu>, Arnd Bergmann <arnd@...db.de>,
	Vineet Gupta <Vineet.Gupta1@...opsys.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Alan Cox <alan@...rguk.ukuu.org.uk>,
	"Geert Uytterhoeven" <geert@...ux-m68k.org>,
	<dahinds@...rs.sourceforge.net>
Subject: Re: [PATCH] drivers/block/xsysace - replace in(out)_8/in(out)_be16/in(out)_le16
 with generic iowrite(read)8/16(be)

On 02/07/2013 08:44 PM, Grant Likely wrote:
>
> Then that data needs to be stored into memory. This is where things
> are different with native 16 bit stores:
>    On a BE memory system. MSB in byte address 0 and LSB in byte address 1.
>    On a LE memory system. MSB in byte address 1 and LSB in byte address 0.
>
> The block subsystem deals with byte oriented buffers; so given the way
> data is arranged in the data port we want to always make sure the LSB
> goes into address 0. The cause of problems isn't the BE vs LE bus
> attachment. It is the different memory system orientation. Using
> ioread16/iowrite16 has the right behaviour, but it's kind of a
> backwards way to go about it.... It isn't that we want a be16_to_cpu()
> or le16_to_cpu() on the data port read, but rather a cpu_to_le16() on
> the store to memory regardless of the endianess of the platform.
>
> So, if I'm correct that means that for the data port (specifically
> copying between RAM and the data port) using ioread16/iowrite16 on the
> data port results in the correct behaviour. It also means that LE
> support in the current driver is broken.

That matches my earlier note when I wrote that for correct work on LE 
(note I'm on ARC, not PPC/MB) I needed to use "io{read|write}16" in 
"ace_data{in|out}_le16".

With original "io{read|write}16be" instead data was corrupted.

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