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]
Message-ID: <750e22fd-ff90-0005-ce14-85c55824b261@gmail.com>
Date:   Fri, 20 Jan 2023 00:31:25 +0100
From:   Philipp Hortmann <philipp.g.hortmann@...il.com>
To:     Larry Finger <Larry.Finger@...inger.net>,
        gregkh@...uxfoundation.org
Cc:     phil@...lpotter.co.uk, linux-staging@...ts.linux.dev,
        linux-kernel@...r.kernel.org, linux-wireless@...r.kernel.org,
        Gaurav Pathak <gauravpathak129@...il.com>
Subject: Re: [PATCH] staging: r8188eu: Fix some endian problems

On 1/19/23 20:12, Larry Finger wrote:
> Sparse lists the following warnings:
> 
>    CHECK   drivers/staging/r8188eu/core/rtw_mlme.c
> drivers/staging/r8188eu/core/rtw_mlme.c:1197:49: warning: incorrect type in
> 					 argument 2 (different base types)
> drivers/staging/r8188eu/core/rtw_mlme.c:1197:49:    expected restricted
> 					 __le16 [usertype] mstatus_rpt
> drivers/staging/r8188eu/core/rtw_mlme.c:1197:49:    got unsigned short
> 					 [assigned] [usertype] media_status_rpt
> drivers/staging/r8188eu/core/rtw_mlme.c:1275:57: warning: incorrect type in
> 					 argument 2 (different base types)
> drivers/staging/r8188eu/core/rtw_mlme.c:1275:57:    expected restricted
> 					 __le16 [usertype] mstatus_rpt
> drivers/staging/r8188eu/core/rtw_mlme.c:1275:57:    got unsigned short
> 					 [assigned] [usertype] media_status
>    CHECK   drivers/staging/r8188eu/core/rtw_mlme_ext.c
> drivers/staging/r8188eu/core/rtw_mlme_ext.c:6842:58: warning: incorrect type
> 					 in argument 2 (different base types)
> drivers/staging/r8188eu/core/rtw_mlme_ext.c:6842:58:    expected restricted
> 					 __le16 [usertype] mstatus_rpt
> drivers/staging/r8188eu/core/rtw_mlme_ext.c:6842:58:    got unsigned short
> 					 [assigned] [usertype] media_status
> 
> The second argument of rtl8188e_set_FwMediaStatus_cmd() needs to be in CPU
> order, not little-endian; however, when it uses that value to call
> FillH2CCmd_88E() the parameter must be in little-endian order as that
> value will be sent to the firmware. Note that the conversion from LE to CPU
> order was le16_to_cpu() rather than the correct cpu_to_le16.
> 
> The definition of FillH2CCmd_88E() is revised, and the proper conversion
> routine is used.
> 
> Note that the original code performed one byte swap on the secong argument
> of FillH2CCmd_88E(), and got the correct answer even though the semantics
> were very wrong.
> 
> Signed-off-by: Larry Finger<Larry.Finger@...inger.net>
> Reportewd-by: Gaurav Pathak<gauravpathak129@...il.com>


Checkpatch does not like the "w" in "Reportewd-by:".

Tested on x86_64
Tested-by: Philipp Hortmann <philipp.g.hortmann@...il.com> # Edimax N150



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ