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]
Message-Id: <20180705.100449.331964278763183582.davem@davemloft.net>
Date:   Thu, 05 Jul 2018 10:04:49 +0900 (KST)
From:   David Miller <davem@...emloft.net>
To:     lirongqing@...du.com
Cc:     netdev@...r.kernel.org
Subject: Re: [PATCH][net-next] net: limit each hash list length to
 MAX_GRO_SKBS

From: Li RongQing <lirongqing@...du.com>
Date: Wed,  4 Jul 2018 16:42:48 +0800

> @@ -4989,10 +4988,11 @@ static int napi_gro_complete(struct sk_buff *skb)
>  	return netif_receive_skb_internal(skb);
>  }
>  
> -static void __napi_gro_flush_chain(struct napi_struct *napi, struct list_head *head,
> +static void __napi_gro_flush_chain(struct napi_struct *napi, int index,
>  				   bool flush_old)

Hash is usually u32, so please lets make the type consistent.  Make index here
a 'u32' and also make 'i' in napi_gro_flush() a 'u32' too.

> @@ -5138,6 +5122,7 @@ static enum gro_result dev_gro_receive(struct napi_struct *napi, struct sk_buff
>  	enum gro_result ret;
>  	int same_flow;
>  	int grow;
> +	u32 hash = skb_get_hash_raw(skb) & (GRO_HASH_BUCKETS - 1);

Please preserve reverse christmas tree local variable ordering.

Otherwise this looks great.

Thank you.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ