bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Fastabend <john.fastabend@gmail.com>
To: John Fastabend <john.fastabend@gmail.com>,
	Jakub Kicinski <jakub.kicinski@netronome.com>,
	John Fastabend <john.fastabend@gmail.com>
Cc: ast@kernel.org, daniel@iogearbox.net, netdev@vger.kernel.org,
	bpf@vger.kernel.org, Eric Dumazet <edumazet@google.com>
Subject: Re: [bpf PATCH v4 1/4] bpf: tls, implement unhash to avoid transition out of ESTABLISHED
Date: Tue, 14 May 2019 15:34:55 -0700	[thread overview]
Message-ID: <5cdb428fe9f53_3e672b0357f765b85c@john-XPS-13-9360.notmuch> (raw)
In-Reply-To: <5cd603329f753_af72ae355cbe5b8e8@john-XPS-13-9360.notmuch>

John Fastabend wrote:
> Jakub Kicinski wrote:
> > On Thu, 09 May 2019 21:57:49 -0700, John Fastabend wrote:
> > > @@ -2042,12 +2060,14 @@ void tls_sw_free_resources_tx(struct sock *sk)
> > >  	if (atomic_read(&ctx->encrypt_pending))
> > >  		crypto_wait_req(-EINPROGRESS, &ctx->async_wait);
> > >  
> > > -	release_sock(sk);
> > > +	if (locked)
> > > +		release_sock(sk);
> > >  	cancel_delayed_work_sync(&ctx->tx_work.work);
> > 
> > So in the splat I got (on a slightly hacked up kernel) it seemed like
> > unhash may be called in atomic context:
> > 
> > [  783.232150]  tls_sk_proto_unhash+0x72/0x110 [tls]
> > [  783.237497]  tcp_set_state+0x484/0x640
> > [  783.241776]  ? __sk_mem_reduce_allocated+0x72/0x4a0
> > [  783.247317]  ? tcp_recv_timestamp+0x5c0/0x5c0
> > [  783.252265]  ? tcp_write_queue_purge+0xa6a/0x1180
> > [  783.257614]  tcp_done+0xac/0x260
> > [  783.261309]  tcp_reset+0xbe/0x350
> > [  783.265101]  tcp_validate_incoming+0xd9d/0x1530
> > 
> > I may have been unclear off-list, I only tested the patch no longer
> > crashes the offload :(
> > 
> 
> Yep, I misread and thought it was resolved here as well. OK I'll dig into
> it. I'm not seeing it from selftests but I guess that means we are missing
> a testcase. :( yet another version I guess.
> 

Seems we need to call release_sock in the unhash case as well. Will
send a new patch shortly.

.John

> Thanks,
> John
> 

  reply	other threads:[~2019-05-14 22:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-10  4:57 [bpf PATCH v4 0/4] sockmap/ktls fixes John Fastabend
2019-05-10  4:57 ` [bpf PATCH v4 1/4] bpf: tls, implement unhash to avoid transition out of ESTABLISHED John Fastabend
2019-05-10 16:53   ` Jakub Kicinski
2019-05-10 17:00   ` Jakub Kicinski
2019-05-10 23:03     ` John Fastabend
2019-05-14 22:34       ` John Fastabend [this message]
2019-05-14 22:58         ` Jakub Kicinski
2019-05-15  4:17           ` John Fastabend
2019-05-10  4:58 ` [bpf PATCH v4 2/4] bpf: sockmap, only stop/flush strp if it was enabled at some point John Fastabend
2019-05-10  4:58 ` [bpf PATCH v4 3/4] bpf: sockmap remove duplicate queue free John Fastabend
2019-05-10  4:58 ` [bpf PATCH v4 4/4] bpf: sockmap fix msg->sg.size account on ingress skb John Fastabend

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=5cdb428fe9f53_3e672b0357f765b85c@john-XPS-13-9360.notmuch \
    --to=john.fastabend@gmail.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=edumazet@google.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).