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 10:47:56 +0100
From:   Marek Vasut <marex@...x.de>
To:     David Miller <davem@...emloft.net>
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

On 2/15/20 10:24 AM, David Miller wrote:
> 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.

So what is the suggestion to fix this properly ?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ