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] [day] [month] [year] [list]
Date:   Tue, 11 Apr 2017 12:28:50 +0200
From:   Ursula Braun <ubraun@...ux.vnet.ibm.com>
To:     David Laight <David.Laight@...LAB.COM>,
        "davem@...emloft.net" <davem@...emloft.net>
Cc:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-s390@...r.kernel.org" <linux-s390@...r.kernel.org>,
        "jwi@...ux.vnet.ibm.com" <jwi@...ux.vnet.ibm.com>,
        "schwidefsky@...ibm.com" <schwidefsky@...ibm.com>,
        "heiko.carstens@...ibm.com" <heiko.carstens@...ibm.com>,
        "raspl@...ux.vnet.ibm.com" <raspl@...ux.vnet.ibm.com>
Subject: Re: [PATCH net-next V2 5/7] s390/qeth: improve endianness handling



On 04/10/2017 05:16 PM, David Laight wrote:
> From: Ursula Braun
>> Sent: 07 April 2017 08:16
>> Avoid endianness warnings reported by sparse by (1) using endianness
>> conversions for assigning and using network packet fields, and (2)
>> removing unnecessary endianness conversions from qeth_l3_rebuild_skb. No
>> functional changes.
> ...
>> -	if (*p == ETH_P_8021Q)
>> +	if (be16_to_cpu(*p) == ETH_P_8021Q)
> ...
> 
> This is clearly different on little-endian systems.
> Also (probably) better written as:
> 
> 	if (*p == cpu_to_be16(ETH_P_8021Q))
> 
> so that the constant can by byteswapped.
> 
> 	David
> 

Thanks, we will keep that in mind for future patches.

> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ