BPF Archive on lore.kernel.org
 help / color / Atom feed
From: Martin Lau <kafai@fb.com>
To: Jakub Sitnicki <jakub@cloudflare.com>
Cc: "bpf@vger.kernel.org" <bpf@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"kernel-team@cloudflare.com" <kernel-team@cloudflare.com>,
	Stanislav Fomichev <sdf@fomichev.me>
Subject: Re: [PATCH bpf-next v2 1/2] flow_dissector: Allow updating the flow dissector program atomically
Date: Thu, 10 Oct 2019 19:41:30 +0000
Message-ID: <20191010194127.h3j5jmqbspj4ewgt@kafai-mbp.dhcp.thefacebook.com> (raw)
In-Reply-To: <20191010181750.5964-2-jakub@cloudflare.com>

On Thu, Oct 10, 2019 at 08:17:49PM +0200, Jakub Sitnicki wrote:
> It is currently not possible to detach the flow dissector program and
> attach a new one in an atomic fashion, that is with a single syscall.
> Attempts to do so will be met with EEXIST error.
> This makes updates to flow dissector program hard. Traffic steering that
> relies on BPF-powered flow dissection gets disrupted while old program has
> been already detached but the new one has not been attached yet.
> There is also a window of opportunity to attach a flow dissector to a
> non-root namespace while updating the root flow dissector, thus blocking
> the update.
> Lastly, the behavior is inconsistent with cgroup BPF programs, which can be
> replaced with a single bpf(BPF_PROG_ATTACH, ...) syscall without any
> restrictions.
> Allow attaching a new flow dissector program when another one is already
> present with a restriction that it can't be the same program.
Acked-by: Martin KaFai Lau <kafai@fb.com>

  reply index

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-10 18:17 [PATCH bpf-next v2 0/2] Atomic flow dissector updates Jakub Sitnicki
2019-10-10 18:17 ` [PATCH bpf-next v2 1/2] flow_dissector: Allow updating the flow dissector program atomically Jakub Sitnicki
2019-10-10 19:41   ` Martin Lau [this message]
2019-10-10 18:17 ` [PATCH bpf-next v2 2/2] selftests/bpf: Check that flow dissector can be re-attached Jakub Sitnicki
2019-10-10 19:42   ` Martin Lau
2019-10-10 19:57 ` [PATCH bpf-next v2 0/2] Atomic flow dissector updates Stanislav Fomichev
2019-10-10 23:38 ` Daniel Borkmann
2019-10-11  8:31   ` Jakub Sitnicki

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191010194127.h3j5jmqbspj4ewgt@kafai-mbp.dhcp.thefacebook.com \
    --to=kafai@fb.com \
    --cc=bpf@vger.kernel.org \
    --cc=jakub@cloudflare.com \
    --cc=kernel-team@cloudflare.com \
    --cc=netdev@vger.kernel.org \
    --cc=sdf@fomichev.me \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

BPF Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/bpf/0 bpf/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 bpf bpf/ https://lore.kernel.org/bpf \
	public-inbox-index bpf

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git