Skip to content

bpf/flow_dissector: add mode to enforce global BPF flow dissector

Stanislav Fomichev bpf netdev 3 versions – Applied

Status from this message: Applied. Thanks

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 1 replyApplied
  2. v22 patches 4 repliesSuperseded
  3. v12 patches 9 repliesSuperseded

Changes in v3 from the cover letter

* drop extra check and empty line (Andrii Nakryiko)

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/2bpf/flow_dissector: add mode to enforce global BPF flow dissectorDocumentation/bpf/prog_flow_dissector.rst net/core/flow_dissector.c+37 -40 replies
2/2selftests/bpf: add test for BPF flow dissector in the root namespacetools/testing/selftests/bpf/test_flow_dissector.sh+42 -60 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchAndrii NakryikoSong Liu
1/2A-b A-b
2/2A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH bpf-next v3 0/2] bpf/flow_dissector: add mode to enforce global BPF flow dissector

While having a per-net-ns flow dissector programs is convenient for testing, security-wise it's better to have only one vetted global flow dissector implementation.

Let's have a convention that when BPF flow dissector is installed in the root namespace, child namespaces can't override it.

The intended use-case is to attach global BPF flow dissector early from the init scripts/systemd. Attaching global dissector is prohibited if some non-root namespace already has flow dissector attached. Also, attaching to non-root namespace is prohibited when there is flow dissector attached to the root namespace.

v3:
* drop extra check and empty line (Andrii Nakryiko)

v2:
* EPERM -> EEXIST (Song Liu)
* Make sure we don't have dissector attached to non-root namespaces when attaching the global one (Andrii Nakryiko)

Cc Petar Penkov <[email protected]>

Stanislav Fomichev (2):
bpf/flow_dissector: add mode to enforce global BPF flow dissector selftests/bpf: add test for BPF flow dissector in the root namespace

 Documentation/bpf/prog_flow_dissector.rst     |  3 ++
 net/core/flow_dissector.c                     | 38 +++++++++++++--
 .../selftests/bpf/test_flow_dissector.sh      | 48 ++++++++++++++++---
 3 files changed, 79 insertions(+), 10 deletions(-)
Signature · 1 line
2.23.0.581.g78d2f28ef7-goog