From: Matthieu Baerts <matttbe@kernel.org>
To: Thaison Phan <thaisonphan@google.com>
Cc: "Eric Dumazet" <edumazet@kernel.org>,
"Neal Cardwell" <ncardwell@google.com>,
"Kuniyuki Iwashima" <kuniyu@google.com>,
"David S . Miller" <davem@davemloft.net>,
"David Ahern" <dsahern@kernel.org>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Simon Horman" <horms@kernel.org>,
"Ilpo Järvinen" <ij@kernel.org>,
"Olivier Tilmans" <olivier.tilmans@nokia.com>,
"Chia-Yu Chang" <chia-yu.chang@nokia-bell-labs.com>,
"Stan Iliev" <stani@google.com>,
netdev@vger.kernel.org, bpf@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v3 2/2] tcp: accecn: initialize AccECN fields in syncookie path
Date: Tue, 17 Nov 2026 19:06:48 +0100 [thread overview]
Message-ID: <a703661f-1877-4d7d-b632-418c97090327@kernel.org> (raw)
In-Reply-To: <20261117124710.1338951-3-thaisonphan@google.com>
Hi Thaison,
On 17/11/2026 13:47, Thaison Phan wrote:
> cookie_tcp_reqsk_alloc() and bpf_sk_assign_tcp_reqsk() allocate struct
> request_sock without __GFP_ZERO, leaving saw_accecn_opt,
> accecn_fail_mode, syn_ect_rcv, and syn_ect_snt uninitialized. When
> accecn_ok is negotiated in cookie_{v4,v6}_check(),
> tcp_ecn_openreq_child() reads all four fields to initialize the child
> socket's AccECN state.
>
> In addition, because the temporary request_sock used to send a cookie
> SYN-ACK is immediately freed, treq->syn_ect_snt is lost. For AccECN
> connections where the listener marks ECT on the SYN-ACK, leaving
> syn_ect_snt as 0 causes tcp_accecn_third_ack() to see a mismatch between
> the expected Not-ECT and the peer's reflected ECT in the ACE field,
> erroneously flagging TCP_ACCECN_ACE_FAIL_RECV in accecn_fail_mode. Refer
> to Table 4 of RFC 9768 for more details.
>
> Initialize saw_accecn_opt, accecn_fail_mode, and syn_ect_rcv in
> cookie_tcp_reqsk_init() to match tcp_openreq_init(), and set syn_ect_snt
> from the listener's TOS/tclass in cookie_{v4,v6}_check() to match
> tcp_{v4,v6}_send_synack().
I missed the v3:
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
prev parent reply other threads:[~2026-11-17 18:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-17 12:47 [PATCH net v3 0/2] tcp: initialize missing request_sock " Thaison Phan
2026-11-17 12:47 ` [PATCH net v3 1/2] tcp: initialize ir_rmt_addr and ir_loc_addr in cookie_v6_check() Thaison Phan
2026-11-17 12:47 ` [PATCH net v3 2/2] tcp: accecn: initialize AccECN fields in syncookie path Thaison Phan
2026-11-17 18:06 ` Matthieu Baerts [this message]
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=a703661f-1877-4d7d-b632-418c97090327@kernel.org \
--to=matttbe@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=chia-yu.chang@nokia-bell-labs.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=ij@kernel.org \
--cc=kuba@kernel.org \
--cc=kuniyu@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
--cc=olivier.tilmans@nokia.com \
--cc=pabeni@redhat.com \
--cc=stani@google.com \
--cc=thaisonphan@google.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
all inboxes | Powered by JetHome®