]> git.baikalelectronics.ru Git - kernel.git/commit
bpf/flow_dissector: add mode to enforce global BPF flow dissector
authorStanislav Fomichev <sdf@google.com>
Mon, 7 Oct 2019 16:21:02 +0000 (09:21 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 8 Oct 2019 03:16:33 +0000 (20:16 -0700)
commit3313e782149af3caf26725404263d29d9b33ccb4
tree476fdf9ca012d3b72a41e2d0904282ce1801df18
parent455cc249e852809475ba78924c09bf86e863979e
bpf/flow_dissector: add mode to enforce global BPF flow dissector

Always use init_net flow dissector BPF program if it's attached and fall
back to the per-net namespace one. Also, deny installing new programs if
there is already one attached to the root namespace.
Users can still detach their BPF programs, but can't attach any
new ones (-EEXIST).

Cc: Petar Penkov <ppenkov@google.com>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Acked-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Stanislav Fomichev <sdf@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Documentation/bpf/prog_flow_dissector.rst
net/core/flow_dissector.c