diff options
author | Jakub Sitnicki <jakub@cloudflare.com> | 2019-10-11 10:29:45 +0200 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2019-10-11 22:26:22 +0200 |
commit | 719b78a5674f15fef2e4a56484614657fd759978 (patch) | |
tree | 6dfbc486cd94db2fc45a75ad11d94b26d1c806ae /kernel/audit_watch.c | |
parent | bpf: Align struct bpf_prog_stats (diff) | |
download | linux-719b78a5674f15fef2e4a56484614657fd759978.tar.xz linux-719b78a5674f15fef2e4a56484614657fd759978.zip |
flow_dissector: Allow updating the flow dissector program atomically
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.
Signed-off-by: Jakub Sitnicki <jakub@cloudflare.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Stanislav Fomichev <sdf@google.com>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Link: https://lore.kernel.org/bpf/20191011082946.22695-2-jakub@cloudflare.com
Diffstat (limited to 'kernel/audit_watch.c')
0 files changed, 0 insertions, 0 deletions