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:   Sat, 15 Feb 2020 01:24:58 -0800 (PST)
From:   David Miller <davem@...emloft.net>
To:     marex@...x.de
Cc:     netdev@...r.kernel.org, lukas@...ner.de, ynezz@...e.cz,
        yuehaibing@...wei.com
Subject: Re: [PATCH 2/3] net: ks8851-ml: Fix 16-bit data access

From: Marek Vasut <marex@...x.de>
Date: Mon, 10 Feb 2020 19:41:38 +0100

> @@ -197,7 +197,7 @@ static inline void ks_inblk(struct ks_net *ks, u16 *wptr, u32 len)
>  {
>  	len >>= 1;
>  	while (len--)
> -		*wptr++ = (u16)ioread16(ks->hw_addr);
> +		*wptr++ = swab16(ioread16(ks->hw_addr));

I agree with the other feedback, the endianness looks wrong here.

The ioread16() translates whatever is behind ks->hw_addr into cpu
endianness.

This is either always little endian (for example), which means that
unconditionally swapping this doesn't seem to make sense.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ