From: Daniel Borkmann <daniel@iogearbox.net>
To: John Fastabend <john.fastabend@gmail.com>,
ast@kernel.org, davejwatson@fb.com
Cc: netdev@vger.kernel.org
Subject: Re: [bpf PATCH v4 0/3] bpf: sockmap fixes
Date: Tue, 6 Feb 2018 13:01:09 +0100 [thread overview]
Message-ID: <7e1e24ad-73d8-6bce-b2ac-617faac95ba6@iogearbox.net> (raw)
In-Reply-To: <20180205181601.6770.76316.stgit@john-Precision-Tower-5810>
On 02/05/2018 07:17 PM, John Fastabend wrote:
> A set of fixes for sockmap to resolve programs referencing sockmaps
> and closing without deleting all entries in the map and/or not detaching
> BPF programs attached to the map. Both leaving entries in the map and
> not detaching programs may result in the map failing to be removed by
> BPF infrastructure due to reference counts never reaching zero.
>
> For this we pull in the ULP infrastructure to hook into the close()
> hook of the sock layer. This seemed natural because we have additional
> sockmap features (to add support for TX hooks) that will also use the
> ULP infrastructure. This allows us to cleanup entries in the map when
> socks are closed() and avoid trying to get the sk_state_change() hook
> to fire in all cases.
>
> The second issue resolved here occurs when users don't detach
> programs. The gist is a refcnt issue resolved by implementing the
> release callback. See patch for details.
>
> For testing I ran both sample/sockmap and selftests bpf/test_maps.c.
> Dave Watson ran TLS test suite on v1 version of the patches without
> the put_module error path change.
>
> v4 fix missing rcu_unlock()
> v3 wrap psock reference in RCU
> v2 changes rebased onto bpf-next with small update adding module_put
Series applied to bpf tree, thanks John!
prev parent reply other threads:[~2018-02-06 12:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-05 18:17 [bpf PATCH v4 0/3] bpf: sockmap fixes John Fastabend
2018-02-05 18:17 ` [bpf PATCH v4 1/3] net: add a UID to use for ULP socket assignment John Fastabend
2018-02-06 12:26 ` Daniel Borkmann
2018-02-05 18:17 ` [bpf PATCH v4 2/3] bpf: sockmap, add sock close() hook to remove socks John Fastabend
2018-02-05 18:17 ` [bpf PATCH v4 3/3] bpf: sockmap, fix leaking maps with attached but not detached progs John Fastabend
2018-02-06 12:01 ` Daniel Borkmann [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=7e1e24ad-73d8-6bce-b2ac-617faac95ba6@iogearbox.net \
--to=daniel@iogearbox.net \
--cc=ast@kernel.org \
--cc=davejwatson@fb.com \
--cc=john.fastabend@gmail.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