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: <a4143368-bfe8-a3f1-c6e0-753359388191@tessares.net>
Date:   Thu, 6 Aug 2020 12:47:08 +0200
From:   Matthieu Baerts <matthieu.baerts@...sares.net>
To:     Tim Froidcoeur <tim.froidcoeur@...sares.net>
Cc:     "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Alexey Kuznetsov <kuznet@....inr.ac.ru>,
        Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
        Patrick McHardy <kaber@...sh.net>,
        KOVACS Krisztian <hidden@...abit.hu>, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH net 1/2] net: refactor bind_bucket fastreuse into helper

Hi Tim,

Thank you for having sent the patch!

On 06/08/2020 08:41, Tim Froidcoeur wrote:
> Refactor the fastreuse update code in inet_csk_get_port into a small
> helper function that can be called from other places.

(...)

> diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c
> index afaf582a5aa9..3b46b1f6086e 100644
> --- a/net/ipv4/inet_connection_sock.c
> +++ b/net/ipv4/inet_connection_sock.c
> @@ -266,7 +266,7 @@ inet_csk_find_open_port(struct sock *sk, struct inet_bind_bucket **tb_ret, int *
>   static inline int sk_reuseport_match(struct inet_bind_bucket *tb,
>   				     struct sock *sk)
>   {
> -	kuid_t uid = sock_i_uid(sk);
> +	kuid_t uid = sock_i_uid((struct sock *)sk);

It seems there is a left over from a previous version. This modification 
is no longer needed.

>   
>   	if (tb->fastreuseport <= 0)
>   		return 0;
> @@ -296,6 +296,57 @@ static inline int sk_reuseport_match(struct inet_bind_bucket *tb,
>   				    ipv6_only_sock(sk), true, false);
>   }
>   
> +void inet_csk_update_fastreuse(struct inet_bind_bucket *tb,
> +			       struct sock *sk)
> +{
> +	kuid_t uid = sock_i_uid((struct sock *)sk);

Same here.

May you send a v2 without these two casts please?

Cheers,
Matt
-- 
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ