From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: Eric Biggers <ebiggers@kernel.org>
Cc: "<netdev@vger.kernel.org>" <netdev@vger.kernel.org>,
"open list:HARDWARE RANDOM NUMBER GENERATOR CORE"
<linux-crypto@vger.kernel.org>,
Herbert Xu <herbert@gondor.apana.org.au>,
Eric Dumazet <edumazet@google.com>,
"David S. Miller" <davem@davemloft.net>,
Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
Jason Baron <jbaron@akamai.com>,
Christoph Paasch <cpaasch@apple.com>,
David Laight <David.Laight@aculab.com>,
Yuchung Cheng <ycheng@google.com>
Subject: Re: [PATCH 2/2] net: fastopen: use endianness agnostic representation of the cookie
Date: Tue, 18 Jun 2019 20:40:18 +0200 [thread overview]
Message-ID: <CAKv+Gu-xBCe09B1=GvXBH3V-p7=fOZcdL5pvFi5v19LT0J4KHA@mail.gmail.com> (raw)
In-Reply-To: <20190618182253.GK184520@gmail.com>
On Tue, 18 Jun 2019 at 20:22, Eric Biggers <ebiggers@kernel.org> wrote:
>
> On Tue, Jun 18, 2019 at 11:32:07AM +0200, Ard Biesheuvel wrote:
> > Use an explicit little endian representation of the fastopen
> > cookie, so that the value no longer depends on the endianness
> > of the system. This fixes a theoretical issue only, since
> > fastopen keys are unlikely to be shared across load balancing
> > server farms that are mixed in endiannes, but it might pop up
> > in validation/selftests as well, so let's just settle on little
> > endian across the board.
> >
> > Note that this change only affects big endian systems.
> >
> > Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> > ---
> > include/linux/tcp.h | 2 +-
> > net/ipv4/tcp_fastopen.c | 16 ++++++++--------
> > 2 files changed, 9 insertions(+), 9 deletions(-)
> >
>
> What about the TCP_FASTOPEN_KEY option for setsockopt and getsockopt? Those
> APIs treat the key as an array of bytes (let's say it's little endian), so
> doesn't it need to be converted to/from the CPU endianness of siphash_key_t?
>
Yeah, good point.
Can we first agree on whether we care about this or not? If so, i can spin a v2.
next prev parent reply other threads:[~2019-06-18 18:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-18 9:32 [PATCH 0/2] net: fastopen: follow-up tweaks for SipHash switch Ard Biesheuvel
2019-06-18 9:32 ` [PATCH 1/2] net: fastopen: make key handling more robust against future changes Ard Biesheuvel
2019-06-18 9:39 ` Eric Dumazet
2019-06-18 9:41 ` Ard Biesheuvel
2019-06-18 9:53 ` Eric Dumazet
2019-06-18 10:02 ` Ard Biesheuvel
2019-06-18 18:18 ` Eric Biggers
2019-06-18 18:19 ` Eric Dumazet
2019-06-18 9:32 ` [PATCH 2/2] net: fastopen: use endianness agnostic representation of the cookie Ard Biesheuvel
2019-06-18 18:22 ` Eric Biggers
2019-06-18 18:40 ` Ard Biesheuvel [this message]
2019-06-18 22:40 ` David Miller
2019-06-18 9:37 ` [PATCH 0/2] net: fastopen: follow-up tweaks for SipHash switch Eric Dumazet
2019-06-18 9:38 ` Ard Biesheuvel
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='CAKv+Gu-xBCe09B1=GvXBH3V-p7=fOZcdL5pvFi5v19LT0J4KHA@mail.gmail.com' \
--to=ard.biesheuvel@linaro.org \
--cc=David.Laight@aculab.com \
--cc=cpaasch@apple.com \
--cc=davem@davemloft.net \
--cc=ebiggers@kernel.org \
--cc=edumazet@google.com \
--cc=herbert@gondor.apana.org.au \
--cc=jbaron@akamai.com \
--cc=kuznet@ms2.inr.ac.ru \
--cc=linux-crypto@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=ycheng@google.com \
--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 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).