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:   Mon, 4 Dec 2017 19:39:10 +0300
From:   Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:     Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>,
        "David S. Miller" <davem@...emloft.net>,
        Niklas Söderlund 
        <niklas.soderlund+renesas@...natech.se>,
        Geert Uytterhoeven <geert+renesas@...der.be>,
        Simon Horman <horms+renesas@...ge.net.au>
Cc:     netdev@...r.kernel.org, linux-renesas-soc@...r.kernel.org
Subject: Re: [PATCH 2/2] net: sh_eth: make work on big endian systems

On 12/04/2017 05:17 PM, Thomas Petazzoni wrote:

> The sh_eth driver uses cpu_to_le32() and le32_to_cpu() to manipulate the
> fields of the DMA descriptors, making the assumption that the DMA 
> descriptors are little-endian.
> 
> However, testing on the Renesas SH7786 running in big-endian mode reveals
> that the DMA descriptors are also big-endian when running big-endian.
> Therefore, all the endianness conversion needs to be removed for the sh_eth
> driver to work.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@...e-electrons.com> --- 
> Note: I see that Sergei Shtylyov has done some work around endianness on
> this driver back in 2015. I am not sure if it's used on other non-SuperH
> platforms in platforms where the CPU might run big-endian but the IP still
> be little-endian.

   The original Renesas' code assumed that... but the big-endian descriptors
(marked as such) were never used by the arch/sh/ code (and the code wouldn't
work right even if they did!). Therefore I did remove EDMAC_BIG_ENDIAN (and
now EDMAC_LITTLE_ENDIAN can be removed as well).

> If this is the case, then we would need a different approach and more
> discussion.

    No, the ARM platforms sh_eth is used on (mostly R-Car) seem to be
little-endian only.

> Therefore, it would be useful to wait for an ACK from Sergei before 
> applying this patch.
    You have it (-:

Acked-by: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>

MBR, Sergei

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ