From: Jakub Kicinski <kuba@kernel.org>
To: Dmitry Safonov <dima@arista.com>
Cc: linux-kernel@vger.kernel.org, David Ahern <dsahern@kernel.org>,
Eric Dumazet <edumazet@google.com>,
Peter Zijlstra <peterz@infradead.org>,
Ard Biesheuvel <ardb@kernel.org>,
Bob Gilligan <gilligan@arista.com>,
"David S. Miller" <davem@davemloft.net>,
Dmitry Safonov <0x7f454c46@gmail.com>,
Francesco Ruggeri <fruggeri@arista.com>,
Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
Jason Baron <jbaron@akamai.com>,
Josh Poimboeuf <jpoimboe@kernel.org>,
Paolo Abeni <pabeni@redhat.com>,
Salam Noureddine <noureddine@arista.com>,
Steven Rostedt <rostedt@goodmis.org>,
netdev@vger.kernel.org
Subject: Re: [PATCH v4 3/5] net/tcp: Disable TCP-MD5 static key on tcp_md5sig_info destruction
Date: Fri, 18 Nov 2022 19:18:09 -0800 [thread overview]
Message-ID: <20221118191809.0174f4da@kernel.org> (raw)
In-Reply-To: <20221115211905.1685426-4-dima@arista.com>
On Tue, 15 Nov 2022 21:19:03 +0000 Dmitry Safonov wrote:
> + if (!rcu_dereference_protected(tp->md5sig_info, lockdep_sock_is_held(sk))) {
> + if (tcp_md5sig_info_add(sk, sk_gfp_mask(sk, GFP_ATOMIC)))
> + return -ENOMEM;
> +
> + if (!static_key_fast_inc_not_negative(&tcp_md5_needed.key.key)) {
> + struct tcp_md5sig_info *md5sig = tp->md5sig_info;
I don't think sparse will be able to deduce that ->md5sig_info access
is safe here, so could you wrap it up as well? Maybe it wouldn't be
the worst move to provide a sk_rcu_dereference() or rcu_dereference_sk()
or some such wrapper.
More importantly tho - was the merging part for this patches discussed?
They don't apply to net-next.
next prev parent reply other threads:[~2022-11-19 3:18 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-15 21:19 [PATCH v4 0/5] net/tcp: Dynamically disable TCP-MD5 static key Dmitry Safonov
2022-11-15 21:19 ` [PATCH v4 1/5] jump_label: Prevent key->enabled int overflow Dmitry Safonov
2022-11-15 21:19 ` [PATCH v4 2/5] net/tcp: Separate tcp_md5sig_info allocation into tcp_md5sig_info_add() Dmitry Safonov
2022-11-15 21:19 ` [PATCH v4 3/5] net/tcp: Disable TCP-MD5 static key on tcp_md5sig_info destruction Dmitry Safonov
2022-11-19 3:18 ` Jakub Kicinski [this message]
2022-11-21 20:31 ` Dmitry Safonov
2022-11-21 20:41 ` Jakub Kicinski
2022-11-21 20:56 ` Dmitry Safonov
2022-11-22 3:53 ` Jakub Kicinski
2022-11-22 4:02 ` Eric Dumazet
2022-11-15 21:19 ` [PATCH v4 4/5] net/tcp: Do cleanup on tcp_md5_key_copy() failure Dmitry Safonov
2022-11-15 21:19 ` [PATCH v4 5/5] net/tcp: Separate initialization of twsk Dmitry Safonov
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=20221118191809.0174f4da@kernel.org \
--to=kuba@kernel.org \
--cc=0x7f454c46@gmail.com \
--cc=ardb@kernel.org \
--cc=davem@davemloft.net \
--cc=dima@arista.com \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=fruggeri@arista.com \
--cc=gilligan@arista.com \
--cc=jbaron@akamai.com \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=noureddine@arista.com \
--cc=pabeni@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=yoshfuji@linux-ipv6.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.