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:   Mon, 14 Jan 2019 08:47:47 -0800
From:   Eric Dumazet <eric.dumazet@...il.com>
To:     Marcus Huewe <suse-tux@....de>, netdev@...r.kernel.org
Cc:     davem@...emloft.net, kuznet@....inr.ac.ru, yoshfuji@...ux-ipv6.org
Subject: Re: [PATCH net] net: use inet_ehash_bucket(...) for consistency



On 01/12/2019 06:07 AM, Marcus Huewe wrote:
> Make the access to the struct inet_hashinfo's ehash member consistent.
> In net/ipv4/inet_hashtables.c, the ehash member is accessed by calling
> inet_ehash_bucket(...) except for the access in __inet_lookup_established.
> In order to make the access consistent, use inet_ehash_bucket(...)
> in __inet_lookup_established.
> 
> Signed-off-by: Marcus Huewe <suse-tux@....de>
> ---
>  net/ipv4/inet_hashtables.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/net/ipv4/inet_hashtables.c b/net/ipv4/inet_hashtables.c
> index 942265d65eb3..2b54eb6e5951 100644
> --- a/net/ipv4/inet_hashtables.c
> +++ b/net/ipv4/inet_hashtables.c
> @@ -361,8 +361,7 @@ struct sock *__inet_lookup_established(struct net *net,
>  	 * have wildcards anyways.
>  	 */
>  	unsigned int hash = inet_ehashfn(net, daddr, hnum, saddr, sport);
> -	unsigned int slot = hash & hashinfo->ehash_mask;
> -	struct inet_ehash_bucket *head = &hashinfo->ehash[slot];
> +	struct inet_ehash_bucket *head = inet_ehash_bucket(hashinfo, hash);
>  
>  begin:
>  	sk_nulls_for_each_rcu(sk, node, &head->chain) {
> 

Have you actually compiled the kernel once this patch is applied ?

Please test your changes before sending a patch.

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ