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: <20191217150841.563d6fb9@cakuba.netronome.com>
Date:   Tue, 17 Dec 2019 15:08:41 -0800
From:   Jakub Kicinski <jakub.kicinski@...ronome.com>
To:     Doug Berger <opendmb@...il.com>
Cc:     "David S. Miller" <davem@...emloft.net>,
        Florian Fainelli <f.fainelli@...il.com>,
        bcm-kernel-feedback-list@...adcom.com, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next 3/8] net: bcmgenet: use CHECKSUM_COMPLETE for
 NETIF_F_RXCSUM

On Tue, 17 Dec 2019 13:02:24 -0800, Doug Berger wrote:
> @@ -1793,6 +1792,10 @@ static unsigned int bcmgenet_desc_rx(struct bcmgenet_rx_ring *ring,
>  
>  			status = (struct status_64 *)skb->data;
>  			dma_length_status = status->length_status;
> +			if (priv->desc_rxchk_en) {
> +				skb->csum = ntohs(status->rx_csum & 0xffff);

This adds a new warning for a W=1 C=1 build:

../drivers/net/ethernet/broadcom/genet/bcmgenet.c:1796:45: warning: cast to res\
tricted __be16                                                                  
../drivers/net/ethernet/broadcom/genet/bcmgenet.c:1796:45: warning: cast to res\
tricted __be16                                                                  
../drivers/net/ethernet/broadcom/genet/bcmgenet.c:1796:45: warning: cast to res\
tricted __be16                                                                  
../drivers/net/ethernet/broadcom/genet/bcmgenet.c:1796:45: warning: cast to res\
tricted __be16                                                                  
../drivers/net/ethernet/broadcom/genet/bcmgenet.c:1796:43: warning: incorrect t\
ype in assignment (different base types)                                        
../drivers/net/ethernet/broadcom/genet/bcmgenet.c:1796:43:    expected restrict\
ed __wsum [usertype] csum                                                       
../drivers/net/ethernet/broadcom/genet/bcmgenet.c:1796:43:    got int           
   
Could you perhaps consider a __force cast or such?

> +				skb->ip_summed = CHECKSUM_COMPLETE;
> +			}
>  		}
>  
>  		/* DMA flags and length are still valid no matter how

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ