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:   Fri, 10 Feb 2017 08:52:12 -0600
From:   Larry Finger <Larry.Finger@...inger.net>
To:     Greg KH <gregkh@...uxfoundation.org>,
        Perry Hooker <perry.hooker@...il.com>
Cc:     devel@...verdev.osuosl.org, florian.c.schilhabel@...glemail.com,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: r8712u: remove unnecessary le32_to_cpu

On 02/10/2017 08:08 AM, Greg KH wrote:
> On Thu, Feb 09, 2017 at 08:51:55PM -0700, Perry Hooker wrote:
>> This patch fixes the following sparse warning:
>> drivers/staging/rtl8712/usb_ops_linux.c:212:33: warning: cast to restricted __le32
>>
>> Signed-off-by: Perry Hooker <perry.hooker@...il.com>
>> ---
>>  drivers/staging/rtl8712/usb_ops_linux.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> Does not apply to my tree :(

That is good. Yes the patch silenced the Sparse warning, but it would BREAK the 
driver on every big-endian machine. Variable pbuf is a pointer to a string of 
bytes *in little-endian order* that is to be converted into a cpu-ordered 32-bit 
quantity. The correct way to silence the warning is to make sure the compiler 
understands what *(pbuf + 1) really is.

BTW, that driver has been tested on BE hardware. Please be careful about endian 
changes.

NACK.

Larry


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ