]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: rename sk_actions to align with bpf infrastructure
authorJohn Fastabend <john.fastabend@gmail.com>
Fri, 27 Oct 2017 16:45:53 +0000 (09:45 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 29 Oct 2017 02:18:48 +0000 (11:18 +0900)
commita8483b0d19443265fdde0f508affe2d9b0e15d97
tree927d92a4bf5018b3f82f4943fd9ee6a657c3a4e9
parent292a7065515e893ee56820ddf621c04de687e640
bpf: rename sk_actions to align with bpf infrastructure

Recent additions to support multiple programs in cgroups impose
a strict requirement, "all yes is yes, any no is no". To enforce
this the infrastructure requires the 'no' return code, SK_DROP in
this case, to be 0.

To apply these rules to SK_SKB program types the sk_actions return
codes need to be adjusted.

This fix adds SK_PASS and makes 'SK_DROP = 0'. Finally, remove
SK_ABORTED to remove any chance that the API may allow aborted
program flows to be passed up the stack. This would be incorrect
behavior and allow programs to break existing policies.

Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/uapi/linux/bpf.h
kernel/bpf/sockmap.c
net/core/filter.c
tools/include/uapi/linux/bpf.h