From: Herbert Xu <herbert@gondor.apana.org.au>
To: Christian Langrock <christian.langrock@secunet.com>
Cc: Steffen Klassert <steffen.klassert@secunet.com>,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH ipsec v6] xfrm: replay: Fix ESN wrap around for GSO
Date: Wed, 12 Oct 2022 17:28:57 +0800 [thread overview]
Message-ID: <Y0aI2bGb24M5vA7B@gondor.apana.org.au> (raw)
In-Reply-To: <6810817b-e6b7-feac-64f8-c83c517ae9a5@secunet.com>
On Fri, Oct 07, 2022 at 04:50:15PM +0200, Christian Langrock wrote:
> When using GSO it can happen that the wrong seq_hi is used for the last
> packets before the wrap around. This can lead to double usage of a
> sequence number. To avoid this, we should serialize this last GSO
> packet.
>
> Fixes: d7dbefc45cf5 ("xfrm: Add xfrm_replay_overflow functions for offloading")
> Co-developed-by: Steffen Klassert <steffen.klassert@secunet.com>
> Signed-off-by: Christian Langrock <christian.langrock@secunet.com>
> ---
> Changes in v6:
> - move overflow check to offloading path to avoid locking issues
>
> Changes in v5:
> - Fix build
>
> Changes in v4:
> - move changelog within comment
> - add reviewer
>
> Changes in v3:
> - fix build
> - remove wrapper function
>
> Changes in v2:
> - switch to bool as return value
> - remove switch case in wrapper function
> ---
> net/ipv4/esp4_offload.c | 3 +++
> net/ipv6/esp6_offload.c | 3 +++
> net/xfrm/xfrm_device.c | 15 ++++++++++++++-
> net/xfrm/xfrm_replay.c | 2 +-
> 4 files changed, 21 insertions(+), 2 deletions(-)
Could you please explain how this code restructure makes it safe
with respect to multiple users of the same xfrm_state?
Thanks,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
next prev parent reply other threads:[~2022-10-12 9:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-07 14:50 Christian Langrock
2022-10-12 8:44 ` Steffen Klassert
2022-10-12 9:28 ` Herbert Xu [this message]
2022-10-13 6:16 ` Steffen Klassert
2022-10-13 8:04 ` Herbert Xu
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=Y0aI2bGb24M5vA7B@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=christian.langrock@secunet.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=steffen.klassert@secunet.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®