netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: Xin Long <lucien.xin@gmail.com>, network dev <netdev@vger.kernel.org>
Cc: davem@davemloft.net, kuba@kernel.org,
	Eric Dumazet <edumazet@google.com>,
	Simon Horman <horms@kernel.org>,
	Stefan Metzmacher <metze@samba.org>,
	Moritz Buhl <mbuhl@openbsd.org>,
	Tyler Fanelli <tfanelli@redhat.com>,
	Pengtao He <hepengtao@xiaomi.com>,
	linux-cifs@vger.kernel.org, Steve French <smfrench@gmail.com>,
	Namjae Jeon <linkinjeon@kernel.org>,
	Paulo Alcantara <pc@manguebit.com>, Tom Talpey <tom@talpey.com>,
	kernel-tls-handshake@lists.linux.dev,
	Chuck Lever <chuck.lever@oracle.com>,
	Jeff Layton <jlayton@kernel.org>,
	Benjamin Coddington <bcodding@redhat.com>,
	Steve Dickson <steved@redhat.com>, Hannes Reinecke <hare@suse.de>,
	Alexander Aring <aahringo@redhat.com>,
	David Howells <dhowells@redhat.com>,
	Cong Wang <xiyou.wangcong@gmail.com>,
	"D . Wythe" <alibuda@linux.alibaba.com>,
	Jason Baron <jbaron@akamai.com>,
	illiliti <illiliti@protonmail.com>,
	Sabrina Dubroca <sd@queasysnail.net>,
	Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>,
	Daniel Stenberg <daniel@haxx.se>,
	Andy Gospodarek <andrew.gospodarek@broadcom.com>
Subject: Re: [PATCH net-next v2 02/15] net: build socket infrastructure for QUIC protocol
Date: Thu, 21 Aug 2025 13:17:44 +0200	[thread overview]
Message-ID: <ec99ef48-c805-4ce8-99d5-dcf254f6e189@redhat.com> (raw)
In-Reply-To: <0456736751c8beb50a089368d8adb71ecccb32b1.1755525878.git.lucien.xin@gmail.com>

On 8/18/25 4:04 PM, Xin Long wrote:
> diff --git a/net/Makefile b/net/Makefile
> index aac960c41db6..7c6de28e9aa5 100644
> --- a/net/Makefile
> +++ b/net/Makefile
> @@ -42,6 +42,7 @@ obj-$(CONFIG_PHONET)		+= phonet/
>  ifneq ($(CONFIG_VLAN_8021Q),)
>  obj-y				+= 8021q/
>  endif
> +obj-$(CONFIG_IP_QUIC)		+= quic/
>  obj-$(CONFIG_IP_SCTP)		+= sctp/
>  obj-$(CONFIG_RDS)		+= rds/
>  obj-$(CONFIG_WIRELESS)		+= wireless/
> diff --git a/net/quic/Kconfig b/net/quic/Kconfig
> new file mode 100644
> index 000000000000..b64fa398750e
> --- /dev/null
> +++ b/net/quic/Kconfig
> @@ -0,0 +1,35 @@
> +# SPDX-License-Identifier: GPL-2.0-or-later
> +#
> +# QUIC configuration
> +#
> +
> +menuconfig IP_QUIC
> +	tristate "QUIC: A UDP-Based Multiplexed and Secure Transport (Experimental)"
> +	depends on INET
> +	depends on IPV6

What if IPV6=m ?

> +	select CRYPTO
> +	select CRYPTO_HMAC
> +	select CRYPTO_HKDF
> +	select CRYPTO_AES
> +	select CRYPTO_GCM
> +	select CRYPTO_CCM
> +	select CRYPTO_CHACHA20POLY1305
> +	select NET_UDP_TUNNEL

Possibly:
	default n

?
[...]
> +static int quic_init_sock(struct sock *sk)
> +{
> +	sk->sk_destruct = inet_sock_destruct;
> +	sk->sk_write_space = quic_write_space;
> +	sock_set_flag(sk, SOCK_USE_WRITE_QUEUE);
> +
> +	WRITE_ONCE(sk->sk_sndbuf, READ_ONCE(sysctl_quic_wmem[1]));
> +	WRITE_ONCE(sk->sk_rcvbuf, READ_ONCE(sysctl_quic_rmem[1]));
> +
> +	local_bh_disable();

Why?

> +	sk_sockets_allocated_inc(sk);
> +	sock_prot_inuse_add(sock_net(sk), sk->sk_prot, 1);
> +	local_bh_enable();
> +
> +	return 0;
> +}
> +
> +static void quic_destroy_sock(struct sock *sk)
> +{
> +	local_bh_disable();

Same question :)

[...]
> +static int quic_disconnect(struct sock *sk, int flags)
> +{
> +	quic_set_state(sk, QUIC_SS_CLOSED); /* for a listen socket only */
> +	return 0;
> +}

disconnect() primary use-case is creating a lot of syzkaller reports.
Since there should be no legacy/backward compatibility issue, I suggest
considering a simple implementation always failing.

/P


  reply	other threads:[~2025-08-21 11:17 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-18 14:04 [PATCH net-next v2 00/15] net: introduce QUIC infrastructure and core subcomponents Xin Long
2025-08-18 14:04 ` [PATCH net-next v2 01/15] net: define IPPROTO_QUIC and SOL_QUIC constants Xin Long
2025-08-18 14:31   ` Stefan Metzmacher
2025-08-18 16:20     ` Matthieu Baerts
2025-08-18 18:37       ` Xin Long
2025-08-19  8:10     ` Namjae Jeon
2025-08-21  8:24       ` Stefan Metzmacher
2025-08-18 14:04 ` [PATCH net-next v2 02/15] net: build socket infrastructure for QUIC protocol Xin Long
2025-08-21 11:17   ` Paolo Abeni [this message]
2025-08-23 18:38     ` Xin Long
2025-08-18 14:04 ` [PATCH net-next v2 03/15] quic: provide common utilities and data structures Xin Long
2025-08-21 12:58   ` Paolo Abeni
2025-08-23 18:15     ` Xin Long
2025-08-18 14:04 ` [PATCH net-next v2 04/15] quic: provide family ops for address and protocol Xin Long
2025-08-21 13:17   ` Paolo Abeni
2025-08-23 17:22     ` Xin Long
2025-08-18 14:04 ` [PATCH net-next v2 05/15] quic: provide quic.h header files for kernel and userspace Xin Long
2025-08-18 14:04 ` [PATCH net-next v2 06/15] quic: add stream management Xin Long
2025-08-21 13:43   ` Paolo Abeni
2025-08-23 17:14     ` Xin Long
2025-08-18 14:04 ` [PATCH net-next v2 07/15] quic: add connection id management Xin Long
2025-08-21 13:55   ` Paolo Abeni
2025-08-23 15:57     ` Xin Long
2025-08-22 17:10   ` Jason Baron
2025-08-23 16:15     ` Xin Long
2025-08-18 14:04 ` [PATCH net-next v2 08/15] quic: add path management Xin Long
2025-08-21 14:18   ` Paolo Abeni
2025-08-23 15:40     ` Xin Long
2025-08-18 14:04 ` [PATCH net-next v2 09/15] quic: add congestion control Xin Long
2025-08-18 14:04 ` [PATCH net-next v2 10/15] quic: add packet number space Xin Long
2025-08-18 14:04 ` [PATCH net-next v2 11/15] quic: add crypto key derivation and installation Xin Long
2025-08-18 14:04 ` [PATCH net-next v2 12/15] quic: add crypto packet encryption and decryption Xin Long
2025-08-18 14:04 ` [PATCH net-next v2 13/15] quic: add timer management Xin Long
2025-08-18 14:04 ` [PATCH net-next v2 14/15] quic: add frame encoder and decoder base Xin Long
2025-08-18 14:04 ` [PATCH net-next v2 15/15] quic: add packet builder and parser base Xin Long
2025-08-23 15:20 ` [PATCH net-next v2 00/15] net: introduce QUIC infrastructure and core subcomponents John Ericson
2025-08-24 17:57   ` Xin Long
2025-08-26 21:48     ` Xin Long

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ec99ef48-c805-4ce8-99d5-dcf254f6e189@redhat.com \
    --to=pabeni@redhat.com \
    --cc=aahringo@redhat.com \
    --cc=alibuda@linux.alibaba.com \
    --cc=andrew.gospodarek@broadcom.com \
    --cc=bcodding@redhat.com \
    --cc=chuck.lever@oracle.com \
    --cc=daniel@haxx.se \
    --cc=davem@davemloft.net \
    --cc=dhowells@redhat.com \
    --cc=edumazet@google.com \
    --cc=hare@suse.de \
    --cc=hepengtao@xiaomi.com \
    --cc=horms@kernel.org \
    --cc=illiliti@protonmail.com \
    --cc=jbaron@akamai.com \
    --cc=jlayton@kernel.org \
    --cc=kernel-tls-handshake@lists.linux.dev \
    --cc=kuba@kernel.org \
    --cc=linkinjeon@kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=lucien.xin@gmail.com \
    --cc=marcelo.leitner@gmail.com \
    --cc=mbuhl@openbsd.org \
    --cc=metze@samba.org \
    --cc=netdev@vger.kernel.org \
    --cc=pc@manguebit.com \
    --cc=sd@queasysnail.net \
    --cc=smfrench@gmail.com \
    --cc=steved@redhat.com \
    --cc=tfanelli@redhat.com \
    --cc=tom@talpey.com \
    --cc=xiyou.wangcong@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).