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:   Tue, 11 Apr 2017 13:57:35 +0300
From:   Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:     Benjamin Herrenschmidt <benh@...nel.crashing.org>,
        netdev@...r.kernel.org
Subject: Re: [PATCH 01/10] ftgmac100: Upgrade to NETIF_F_HW_CSUM

Hello!

On 4/11/2017 4:04 AM, Benjamin Herrenschmidt wrote:

> The documentation describes NETIF_F_IP_CSUM as deprecated
> so let's switch to NETIF_F_HW_CSUM and use the helper to
> handle unhandled protocols.
>
> Signed-off-by: Benjamin Herrenschmidt <benh@...nel.crashing.org>
> ---
>  drivers/net/ethernet/faraday/ftgmac100.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c
> index 98b8956..85b650a 100644
> --- a/drivers/net/ethernet/faraday/ftgmac100.c
> +++ b/drivers/net/ethernet/faraday/ftgmac100.c
> @@ -637,7 +637,8 @@ static int ftgmac100_hard_start_xmit(struct sk_buff *skb,
>  				csum_vlan |= FTGMAC100_TXDES1_TCP_CHKSUM;
>  			else if (ip_proto == IPPROTO_UDP)
>  				csum_vlan |= FTGMAC100_TXDES1_UDP_CHKSUM;
> -		}
> +		} else if (skb_checksum_help(skb))
> +			goto drop;

    Need {} here as well since the 1st branch has it -- see 
Documentation/process/coding-style.rst (the end of the section 3).

[...]

MBR, Sergei

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ