netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steffen Klassert <steffen.klassert@secunet.com>
To: Ilan Tayari <ilant@mellanox.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH 07/16] esp4: Reorganize esp_output
Date: Wed, 26 Apr 2017 14:06:43 +0200	[thread overview]
Message-ID: <20170426120643.GV2649@secunet.com> (raw)
In-Reply-To: <AM4PR0501MB1940C8509F15D99381D19E2CDB110@AM4PR0501MB1940.eurprd05.prod.outlook.com>

On Wed, Apr 26, 2017 at 11:52:47AM +0000, Ilan Tayari wrote:
> 
> esp_output_head() might do an skb_cow, which then invalidates the esp.esph pointer and causes a crash later on.
> I would expect the ip_esp_hdr() call to be after the esp_output_head() call.
> 
> But it seems like this pointer was saved here around the call to esp_output_head() on purpose.
> Is that really so? 

Yes, it is needed for udpencap, this might also change esp.esph pointer.
I guess this needs to be done also if skb_cow invalidates the esp.esph
pointer.

> 
> Also, esp6/esp6_offload don't make use of esp_info.esph
> Only esp_output_tail() uses it, and could have done everything it does without it.
> So maybe it's un-needed?

IPv6 does not have udpencap, so it might be not needed there.

> 
> I am still testing a fix patch for the crash, there may be also something similar on the RX path, though.

Ok, thanks!

  reply	other threads:[~2017-04-26 12:07 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-20  8:54 pull request (net-next): ipsec-next 2017-04-20 Steffen Klassert
2017-04-20  8:55 ` [PATCH 01/16] net: Add ESP offload features Steffen Klassert
2017-04-20  8:55 ` [PATCH 02/16] xfrm: Add a xfrm type offload Steffen Klassert
2017-04-20  8:55 ` [PATCH 03/16] xfrm: Move device notifications to a sepatate file Steffen Klassert
2017-04-20  8:55 ` [PATCH 04/16] xfrm: Add mode handlers for IPsec on layer 2 Steffen Klassert
2017-04-20  8:55 ` [PATCH 05/16] xfrm: Add an IPsec hardware offloading API Steffen Klassert
2017-04-20  8:55 ` [PATCH 06/16] esp6: Remame esp_input_done2 Steffen Klassert
2017-04-20  8:55 ` [PATCH 07/16] esp4: Reorganize esp_output Steffen Klassert
2017-04-26 11:52   ` Ilan Tayari
2017-04-26 12:06     ` Steffen Klassert [this message]
2017-04-20  8:55 ` [PATCH 08/16] esp6: " Steffen Klassert
2017-04-20  8:55 ` [PATCH 09/16] esp: Add gso handlers for esp4 and esp6 Steffen Klassert
2017-04-20  8:55 ` [PATCH 10/16] xfrm: Add xfrm_replay_overflow functions for offloading Steffen Klassert
2017-04-20  8:55 ` [PATCH 11/16] esp: Use a synchronous crypto algorithm on offloading Steffen Klassert
2017-04-20  9:06   ` Herbert Xu
2017-04-20  9:17     ` Steffen Klassert
2017-04-20  9:52       ` Herbert Xu
2017-04-20 10:50         ` Steffen Klassert
2017-04-21  5:29           ` Herbert Xu
2017-04-21  8:33             ` Steffen Klassert
2017-04-20  8:55 ` [PATCH 12/16] net: Add a xfrm validate function to validate_xmit_skb Steffen Klassert
2017-04-20  8:55 ` [PATCH 13/16] xfrm: Add encapsulation header offsets while SKB is not encrypted Steffen Klassert
2017-04-20  8:55 ` [PATCH 14/16] xfrm: Prepare the GRO codepath for hardware offloading Steffen Klassert
2017-04-20  8:55 ` [PATCH 15/16] esp6: fix incorrect null pointer check on xo Steffen Klassert
2017-04-20  8:55 ` [PATCH 16/16] esp4/6: Fix GSO path for non-GSO SW-crypto packets Steffen Klassert
2017-04-21 19:14 ` pull request (net-next): ipsec-next 2017-04-20 David Miller

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=20170426120643.GV2649@secunet.com \
    --to=steffen.klassert@secunet.com \
    --cc=ilant@mellanox.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).