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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 10 Feb 2020 20:35:40 +0100
From:   Lukas Wunner <lukas@...ner.de>
To:     Marek Vasut <marex@...x.de>
Cc:     netdev@...r.kernel.org, "David S . Miller" <davem@...emloft.net>,
        Petr Stetiar <ynezz@...e.cz>,
        YueHaibing <yuehaibing@...wei.com>
Subject: Re: [PATCH 2/3] net: ks8851-ml: Fix 16-bit data access

On Mon, Feb 10, 2020 at 07:41:38PM +0100, Marek Vasut wrote:
> The packet data written to and read from Micrel KSZ8851-16MLLI must be
> byte-swapped in 16-bit mode, add this byte-swapping.
[...]
> -		*wptr++ = (u16)ioread16(ks->hw_addr);
> +		*wptr++ = swab16(ioread16(ks->hw_addr));

Um, doesn't this depend on the endianness of the CPU architecture?
I'd expect be16_to_cpu() or le16_to_cpu() here instead of swab16().

Thanks,

Lukas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ