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: <CANn89iLD=ySFfPYkrb+oN2fuMhimxXfHrhs4Pv9_60f912rzmQ@mail.gmail.com>
Date: Wed, 11 Oct 2023 20:10:19 +0200
From: Eric Dumazet <edumazet@...gle.com>
To: Dmitry Safonov <dima@...sta.com>
Cc: David Ahern <dsahern@...nel.org>, Paolo Abeni <pabeni@...hat.com>, 
	Jakub Kicinski <kuba@...nel.org>, "David S. Miller" <davem@...emloft.net>, linux-kernel@...r.kernel.org, 
	Andy Lutomirski <luto@...capital.net>, Ard Biesheuvel <ardb@...nel.org>, 
	Bob Gilligan <gilligan@...sta.com>, Dan Carpenter <error27@...il.com>, 
	David Laight <David.Laight@...lab.com>, Dmitry Safonov <0x7f454c46@...il.com>, 
	Donald Cassidy <dcassidy@...hat.com>, Eric Biggers <ebiggers@...nel.org>, 
	"Eric W. Biederman" <ebiederm@...ssion.com>, Francesco Ruggeri <fruggeri05@...il.com>, 
	"Gaillardetz, Dominik" <dgaillar@...na.com>, Herbert Xu <herbert@...dor.apana.org.au>, 
	Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>, Ivan Delalande <colona@...sta.com>, 
	Leonard Crestez <cdleonard@...il.com>, "Nassiri, Mohammad" <mnassiri@...na.com>, 
	Salam Noureddine <noureddine@...sta.com>, Simon Horman <simon.horman@...igine.com>, 
	"Tetreault, Francois" <ftetreau@...na.com>, netdev@...r.kernel.org
Subject: Re: [PATCH v14 net-next 09/23] net/tcp: Add TCP-AO sign to twsk

On Tue, Oct 10, 2023 at 1:07 AM Dmitry Safonov <dima@...sta.com> wrote:
>
> Add support for sockets in time-wait state.
> ao_info as well as all keys are inherited on transition to time-wait
> socket. The lifetime of ao_info is now protected by ref counter, so
> that tcp_ao_destroy_sock() will destruct it only when the last user is
> gone.
>
> Co-developed-by: Francesco Ruggeri <fruggeri@...sta.com>
> Signed-off-by: Francesco Ruggeri <fruggeri@...sta.com>
> Co-developed-by: Salam Noureddine <noureddine@...sta.com>
> Signed-off-by: Salam Noureddine <noureddine@...sta.com>
> Signed-off-by: Dmitry Safonov <dima@...sta.com>
> Acked-by: David Ahern <dsahern@...nel.org>
> ---
>  include/linux/tcp.h      |  3 ++
>  include/net/tcp_ao.h     | 11 ++++-
>  net/ipv4/tcp_ao.c        | 46 +++++++++++++++++---
>  net/ipv4/tcp_ipv4.c      | 92 +++++++++++++++++++++++++++++++---------
>  net/ipv4/tcp_minisocks.c |  4 +-
>  net/ipv4/tcp_output.c    |  2 +-
>  net/ipv6/tcp_ipv6.c      | 72 ++++++++++++++++++++++---------
>  7 files changed, 181 insertions(+), 49 deletions(-)
>
> diff --git a/include/linux/tcp.h b/include/linux/tcp.h
> index c38778b0baa0..51458219be4e 100644
> --- a/include/linux/tcp.h
> +++ b/include/linux/tcp.h
> @@ -512,6 +512,9 @@ struct tcp_timewait_sock {
>  #ifdef CONFIG_TCP_MD5SIG
>         struct tcp_md5sig_key     *tw_md5_key;
>  #endif
> +#ifdef CONFIG_TCP_AO
> +       struct tcp_ao_info      __rcu *ao_info;
> +#endif
>  };
>
>  static inline struct tcp_timewait_sock *tcp_twsk(const struct sock *sk)
> diff --git a/include/net/tcp_ao.h b/include/net/tcp_ao.h
> index 629ab0365b83..af2caf7e76fc 100644
> --- a/include/net/tcp_ao.h
> +++ b/include/net/tcp_ao.h
> @@ -85,6 +85,7 @@ struct tcp_ao_info {
>                                 __unused        :31;
>         __be32                  lisn;
>         __be32                  risn;
> +       atomic_t                refcnt;         /* Protects twsk destruction */

This needs to be a refcount_t

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ