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:   Wed, 23 Oct 2019 20:30:14 +0300
From:   Aaro Koskinen <aaro.koskinen@....fi>
To:     Wambui Karuga <wambui.karugax@...il.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     outreachy-kernel@...glegroups.com, devel@...verdev.osuosl.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: octeon: Fix incorrect type in assignment

Hi,

On Thu, Oct 10, 2019 at 07:38:15AM +0300, Wambui Karuga wrote:
> Fix the following warning generated by sparse in
> drivers/staging/octeon/ethernet-tx.c:
> 
> drivers/staging/octeon/ethernet-tx.c:563:50: warning: incorrect type in assignment (different base types)
> drivers/staging/octeon/ethernet-tx.c:563:50:    expected unsigned short [usertype] hw_chksum
> drivers/staging/octeon/ethernet-tx.c:563:50:    got restricted __wsum [usertype] csum
> 
> Warning generated by running:
> make C=2 CF="-D__CHECK_ENDIAN__" drivers/staging/octeon/
> 
> Signed-off-by: Wambui Karuga <wambui.karugax@...il.com>
> ---
>  drivers/staging/octeon/octeon-stubs.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/octeon/octeon-stubs.h b/drivers/staging/octeon/octeon-stubs.h
> index 38954b6c89e1..b2e3c72205dd 100644
> --- a/drivers/staging/octeon/octeon-stubs.h
> +++ b/drivers/staging/octeon/octeon-stubs.h
> @@ -123,7 +123,7 @@ union cvmx_pip_wqe_word0 {
>  	struct {
>  		uint64_t next_ptr:40;
>  		uint8_t unused;
> -		uint16_t hw_chksum;
> +		__wsum hw_chksum;

I don't think this is correct. This struct defines HW register layout,
and the field needs to be 16 bits.

A.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ