From: Guillaume Nault <gnault@redhat.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: David Miller <davem@davemloft.net>,
Jakub Kicinski <jakub.kicinski@netronome.com>,
netdev@vger.kernel.org, Eric Dumazet <edumazet@google.com>
Subject: Re: [PATCH net v3 3/3] tcp: Protect accesses to .ts_recent_stamp with {READ,WRITE}_ONCE()
Date: Fri, 6 Dec 2019 12:08:36 +0100 [thread overview]
Message-ID: <20191206110836.GB31416@linux.home> (raw)
In-Reply-To: <27c9579d-634d-99c9-689c-65e3f4a2b296@gmail.com>
On Thu, Dec 05, 2019 at 07:50:39PM -0800, Eric Dumazet wrote:
>
>
> On 12/5/19 5:50 PM, Guillaume Nault wrote:
> > Syncookies borrow the ->rx_opt.ts_recent_stamp field to store the
> > timestamp of the last synflood. Protect them with READ_ONCE() and
> > WRITE_ONCE() since reads and writes aren't serialised.
> >
> > Fixes: 264ea103a747 ("tcp: syncookies: extend validity range")
> > Signed-off-by: Guillaume Nault <gnault@redhat.com>
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
>
> To be fair, bug was there before the patch mentioned in the Fixes: tag,
> but we probably do not care enough to backport this to very old kernels.
>
I used this commit because it introduced the conditional in
tcp_synq_overflow(), which I believe made the lockless accesses more
dangerous than they were. But yes, the problem has been there forever.
I have to post a v4 anyway, so I'll change this tag to reference the
first commit in the tree.
prev parent reply other threads:[~2019-12-06 11:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-06 1:49 [PATCH net v3 0/3] tcp: fix handling of stale syncookies timestamps Guillaume Nault
2019-12-06 1:49 ` [PATCH net v3 1/3] tcp: fix rejected syncookies due to stale timestamps Guillaume Nault
2019-12-06 3:41 ` Eric Dumazet
2019-12-06 11:03 ` Guillaume Nault
2019-12-06 1:49 ` [PATCH net v3 2/3] tcp: tighten acceptance of ACKs not matching a child socket Guillaume Nault
2019-12-06 3:45 ` Eric Dumazet
2019-12-06 1:50 ` [PATCH net v3 3/3] tcp: Protect accesses to .ts_recent_stamp with {READ,WRITE}_ONCE() Guillaume Nault
2019-12-06 3:50 ` Eric Dumazet
2019-12-06 11:08 ` Guillaume Nault [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=20191206110836.GB31416@linux.home \
--to=gnault@redhat.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=eric.dumazet@gmail.com \
--cc=jakub.kicinski@netronome.com \
--cc=netdev@vger.kernel.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 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).