public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Roman Gushchin <guro@fb.com>
To: Daniel Borkmann <daniel@iogearbox.net>
Cc: "ast@kernel.org" <ast@kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"bpf@vger.kernel.org" <bpf@vger.kernel.org>,
	"Martin Lau" <kafai@fb.com>
Subject: Re: [PATCH bpf] bpf: Fix cgroup local storage prog tracking
Date: Tue, 17 Dec 2019 18:14:00 +0000	[thread overview]
Message-ID: <20191217181356.GA5770@localhost.localdomain> (raw)
In-Reply-To: <1471c69eca3022218666f909bc927a92388fd09e.1576580332.git.daniel@iogearbox.net>

On Tue, Dec 17, 2019 at 01:28:16PM +0100, Daniel Borkmann wrote:
> Recently noticed that we're tracking programs related to local storage maps
> through their prog pointer. This is a wrong assumption since the prog pointer
> can still change throughout the verification process, for example, whenever
> bpf_patch_insn_single() is called.

Oh, I didn't know it.

> 
> Therefore, the prog pointer that was assigned via bpf_cgroup_storage_assign()
> is not guaranteed to be the same as we pass in bpf_cgroup_storage_release()
> and the map would therefore remain in busy state forever. Fix this by using
> the prog's aux pointer which is stable throughout verification and beyond.
> 
> Fixes: de9cbbaadba5 ("bpf: introduce cgroup storage maps")
> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
> Cc: Roman Gushchin <guro@fb.com>
> Cc: Martin KaFai Lau <kafai@fb.com>

Acked-by: Roman Gushchin <guro@fb.com>

Thank you, Daniel!

      parent reply	other threads:[~2019-12-17 18:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-17 12:28 [PATCH bpf] bpf: Fix cgroup local storage prog tracking Daniel Borkmann
2019-12-17 17:32 ` Alexei Starovoitov
2019-12-17 18:14 ` Roman Gushchin [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=20191217181356.GA5770@localhost.localdomain \
    --to=guro@fb.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=kafai@fb.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