From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.215.179 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796418297; b=D9qvP9CfLckBJiuY1EahQiDi4uTVJfaI+ab/w9VlCbKSKcFAg/Y9HrZJJo8zbDjbQMBW FRu8CDXYJ0sFc0RexyDin+0o9J5VmemaYsEqWcsjwjUmDZAB/8ZvKRC55EDSOQ09gKRhv wrlxihowl0Ihipnyy2Bnq/2HjKZhs1pyYgNwvv424zeqhIQ48SLeNsIXFl0q21aSl6TxQ 0xH0ZJfFJl12J92xqn6yCL9aFc0SsNtkwtGsWQYPrwkgBJFND2+bx5/+XZAarbqqiOdhD qIVJC5RoRxlPsKQNt2mYrTmHD8WYMW2jIeF/fay8gZCPZ66dRQ/S8K82F+mjgVYexTw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796418297; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Gm-Gg:X-Received:Received:Content-Type:Date: Message-Id:Cc:Subject:From:To:In-Reply-To:References: Content-Transfer-Encoding:MIME-Version; bh=WX2T7InjrSW7Ibwrtae9AEohU+dA4LMlZ8VwDM5eEKg=; b=wIhkZ2SgriO/nMPzxKrNfT2DXTEy6Y3/gfMoU/1n8vIJYfjyfyqpUXFeTp8TIeGhSKOi UGu3H65vgj+yzLQ0WFiehP33+Kn0EZeIUxv8ILW9g25FPY3gnIiq8dRr2jz4PP+jH7y88 D0ZmexrJ2hl0iSPxLmtY/H1u/BELF3yR7y7pWtuqLfdKQoi3eXD2F18eSKv/i3Pk7JVWr myTupHRckWesiETpJVqgRGCXI6OPjf5V85ebHnbi/xvf8VAVJSWdrnm4RAjmkRaHhMKTD Cq7tWcZRJsa3Pvb7903VeZBJWCm/PWTMV91h7mrlveTcx1AqD7NwBvQzNa7HlaXX0+Q== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=oCnMx6ni; arc=none smtp.remote-ip=209.85.215.179 Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.179]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 56A47606A32C for ; Fri, 4 Dec 2026 21:04:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 56A47606A32C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=oCnMx6ni Received: by mail-pg1-f179.google.com with SMTP id 41be03b00d2f7-ce12ecc2af9so242860a12.1 for ; Fri, 04 Dec 2026 13:04:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796418296; x=1797023096; darn=vger.kernel.org; h=mime-version:content-transfer-encoding:references:in-reply-to:to :from:subject:cc:message-id:date:content-type:from:to:cc:subject :date:message-id:reply-to:content-type; bh=WX2T7InjrSW7Ibwrtae9AEohU+dA4LMlZ8VwDM5eEKg=; b=oCnMx6nivH9paVLU23TCV0MS0N2eohfAw48jVg9GDZkxlZKK9dzyICuW3zAUziEkqe 8FTaB0pW9tCNfVwsMFYNcMGsyB5xXIqUvpChouSi2XIhmNrghrZNhJq+WFEv+wfFQBxv VTQkDRmIfywMaEm4M7QacUSg0BsSUgWvB/ttNx/sYh9Acb4rlCh2ZPfQbKEqBhXBJhK4 TrH6P2lfwm3ZTILNZA3kZ/mDTpHxYyw8HIdFaVXEu33MXkKY8q4KelRFi6ZwdhQQLsN8 rGbT+LivybMD+J1dXGTjj1g11GIkghmMZY3e4UbeCcMWptwjcf/5Jl1mqC/iX8ygQUmS 3jiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796418296; x=1797023096; h=mime-version:content-transfer-encoding:references:in-reply-to:to :from:subject:cc:message-id:date:content-type:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=WX2T7InjrSW7Ibwrtae9AEohU+dA4LMlZ8VwDM5eEKg=; b=LdUh2uKOGS8OFIu5f1v5fKve78QoVhOKsCWJGI0Qpqf51IY7CunOuWgXkxLt9Lb0oF +rJui+PVTNSEARxoZx0x36ZqcDMnUvEMbqhttNIWNAnvFWcfOjfn13Hg1/gGIhQ319Aw 68kL6DOqt1BJFSmjp6lzMJl42YxLboUrHE0rNeZyL1UM5JMnFLbHJQwiFmmkQVyzwoNm /ldwMIc95eMHiPokz0Q8YaVnfbCyfMrCz1eDIZ+mgfA7XOqP85zBHF1bbSypgY6XyPfK sjMIJ/aTGkL75V9VpMpKuHmMB91fwrrwhSb9vdxOgdnnEEtpS5KysG4HSoqm4+wYZn+G fzuw== X-Gm-Message-State: AB4q+uEOPERzRyYKuvGMjox2U4TkrO9O5XSsjr2KfNaNAxbS+UnfMdm9 89wB4Ay44MLaU1djJchUpArRiMdObD8T+RUxGOtK9AmDnVS8WhR7nUqc X-Gm-Gg: AZFdTZdsqoTaQc/SXIlfUPLgcDBZBdadhbZftT2Za3RQcmqGSn/W2uQqFLMYtN4d5vA TOh/vUfm0qvhdZgb0zmR8LPTrdOfH7DsquyyoTFFSmb0mR/Bhlm+lVU1hE/lSwd3VHQ956pIDwe sLTAl5zuAemPtLv3S9OjYFFoezDO2FHYj8lz6QVsSUmTFQ5L8dv/wov/cuGHv1ho1GD9jgoPMub 5DxCTaS3JwcR9byYQBC+q9C0TUPT3K1vNK86qUXUptAVgfN5Up/oVZiYUmxJyY9jfTrw1v/Vs2b dmoZSJOrKedXXkPlrnVEb901hOG/1dLmKAKEPF30fEwWMbUFji+ODZCe8ITe5r7UICfGjvbQpRi SIuurfXgH3VEKYyOQ94ankRtogZEXEXMt1kci49UHi86XH9BswxPiH7PCb8h/DHGEIZh98yiix/ Vv48FGi7F0sSjZDWxDiHhXnatIzRdX0PHPkXOTolKQlxqxGIEcggpF2WI1SVFPh8F2IguHf5Ma/ Ou1VsHmBiFRwAwzVQWZjWs1IbfxM5mNkzOpRH9D8hDWdvJFH6AkFCksS/9xLtpqhzV7+gqa2uHQ E+3gTafJOi/2+c19oq7lltW0U3xWW3ZkDsid/Ap+EbiBAiiyur/UCanFvzKeVpE1SWsbKTamMW2 8krORchuPxZHwfRMSdz7j8t83jLVlnK9Seg== X-Received: by 2002:a17:90b:4c02:b0:3b5:32db:130 with SMTP id 98e67ed59e1d1-3b5e0619bd3mr1763928a91.13.1796418296281; Fri, 04 Dec 2026 13:04:56 -0800 (PST) Received: from localhost ([153.61.198.241]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3b5c7d65000sm11003014a91.11.2026.12.04.13.04.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 04 Dec 2026 13:04:55 -0800 (PST) Content-Type: text/plain; charset=UTF-8 Date: Fri, 04 Dec 2026 21:04:55 +0000 Message-Id: Cc: , , , , , , Subject: Re: [PATCH bpf v2 0/3] tcp, bpf: fix CA state on open and the TCP_CONGESTION name check From: "Alexei Starovoitov" To: "Paul Moses" , In-Reply-To: References: Content-Transfer-Encoding: 8bit X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 On Fri, Dec 04, 2026 at 01:01 AM Paul Moses wrote: > Patches 1 and 2 fix the cases Alexei reported [1]: stale CA state > when a route changes the algorithm or a child inherits the listener's > private state. Patch 3 uses the same name for the CDG check and lookup. tcp fixes go via net tree. Patch 1 fixes a tcp bug. bpf is not needed to hit it. Use setsockopt("vegas") instead of bpf_cc in the sequence from [1]. tcp_vegas_init() sets minRTT and baseRTT to 0x7fffffff. They are at offsets 16 and 20 of icsk_ca_priv. cdg keeps ca->gradients there. tcp_init_transfer() skips tcp_cdg_init(), so tcp_cdg_grad() and tcp_cdg_release() see ca->gradients == 0x7fffffff7fffffff. > Patch 2 needs Jiayuan's fix [2] so the clone hook runs after the > child's CA state is cleared. It doesn't. Without [2] the lsm prog can init a cc on the child before tcp_ca_openreq_child() runs. The reset drops that state without ->release(). cdg is the only in-tree cc with ->release(), and bpf_setsockopt() refuses cdg. So there is nothing to free. A bpf cc gets ->init() twice. That's all. Patches 1 and 2 don't depend on [2]. The backports don't either. > I left the callback issue [3] out after reading more historical context. In [3] you asked whether bpf_setsockopt(TCP_CONGESTION) can be limited to .init. No. It doesn't help. .init of a bpf cc can write icsk_ca_priv after bpf_setsockopt() returns. Pls resend patches 1 and 2 as [PATCH net]. Pls resend patch 3 alone as [PATCH bpf v3]. It doesn't depend on them. pw-bot: cr