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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181122.111409.1916119049669239920.davem@davemloft.net>
Date:   Thu, 22 Nov 2018 11:14:09 -0800 (PST)
From:   David Miller <davem@...emloft.net>
To:     Igor.Russkikh@...antia.com
Cc:     linux-usb@...r.kernel.org, netdev@...r.kernel.org, andrew@...n.ch,
        Dmitry.Bezrukov@...antia.com
Subject: Re: [PATCH v3 net-next 10/21] net: usb: aqc111: Add checksum
 offload support

From: Igor Russkikh <Igor.Russkikh@...antia.com>
Date: Wed, 21 Nov 2018 10:13:42 +0000

> +static void aqc111_rx_checksum(struct sk_buff *skb, u64 *pkt_desc)
> +{
 ...
> +	/* checksum error bit is set */
> +	if (*pkt_desc & AQ_RX_PD_L4_ERR || *pkt_desc & AQ_RX_PD_L3_ERR)
> +		return;
 ...
> @@ -661,6 +698,7 @@ static int aqc111_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
>  		skb_set_tail_pointer(new_skb, new_skb->len);
>  
>  		new_skb->truesize = new_skb->len + sizeof(struct sk_buff);
> +		aqc111_rx_checksum(new_skb, pkt_desc);

This is another reason to use a 'cpu_desc' local variable to hold the
endian translated descriptor value so you don't have to dereference
this thing over and over again.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ