From: Eric Dumazet <eric.dumazet@gmail.com>
To: Ursula Braun <ubraun@linux.vnet.ibm.com>, davem@davemloft.net
Cc: netdev@vger.kernel.org, linux-s390@vger.kernel.org,
schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com,
raspl@linux.vnet.ibm.com
Subject: Re: [PATCH net-next 1/1] net/ipv4: disable SMC TCP option with SYN Cookies
Date: Thu, 22 Mar 2018 07:30:48 -0700 [thread overview]
Message-ID: <541e6836-a3be-58ef-dbbf-0f114042b86a@gmail.com> (raw)
In-Reply-To: <9b88f9f8-1d3b-7d7d-f612-b823069afa75@linux.vnet.ibm.com>
On 03/22/2018 06:23 AM, Ursula Braun wrote:
> We moved the clear to cookie_v4_check()/cookie_v6_check. However, this does not seem to
> be sufficient to prevent the SYNACK from containing the SMC experimental option.
> We found that an additional check in tcp_conn_request() helps:
>
> --- a/net/ipv4/tcp_input.c
> +++ b/net/ipv4/tcp_input.c
> @@ -6248,6 +6248,9 @@ int tcp_conn_request(struct request_sock
> if (want_cookie && !tmp_opt.saw_tstamp)
> tcp_clear_options(&tmp_opt);
>
> + if (IS_ENABLED(CONFIG_SMC) && want_cookie && tmp_opt.smc_ok)
> + tmp_opt.smc_ok = 0;
> +
> tmp_opt.tstamp_ok = tmp_opt.saw_tstamp;
> tcp_openreq_init(req, &tmp_opt, skb, sk);
> inet_rsk(req)->no_srccheck = inet_sk(sk)->transparent;
>
> Do you think this could be the right place for clearing the smc_ok bit?
Yes, but since tmp_opt is private to this thread/cpu, no false sharing to be afraid of
if (IS_ENABLED(CONFIG_SMC) && want_cookie)
tmp_opt.smc_ok = 0;
prev parent reply other threads:[~2018-03-22 14:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-20 15:53 [PATCH net-next 0/1] net/ipv4: SMC and SYN Cookies Ursula Braun
2018-03-20 15:53 ` [PATCH net-next 1/1] net/ipv4: disable SMC TCP option with " Ursula Braun
2018-03-20 16:21 ` Eric Dumazet
2018-03-20 16:43 ` Eric Dumazet
2018-03-22 13:23 ` Ursula Braun
2018-03-22 14:30 ` Eric Dumazet [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=541e6836-a3be-58ef-dbbf-0f114042b86a@gmail.com \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=heiko.carstens@de.ibm.com \
--cc=linux-s390@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=raspl@linux.vnet.ibm.com \
--cc=schwidefsky@de.ibm.com \
--cc=ubraun@linux.vnet.ibm.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).