aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJohn Fastabend <john.fastabend@gmail.com>2017-10-27 09:45:53 -0700
committerDavid S. Miller <davem@davemloft.net>2017-10-29 11:18:48 +0900
commitbfa640757e9378c2f26867e723f1287e94f5a7ad (patch)
tree927d92a4bf5018b3f82f4943fd9ee6a657c3a4e9 /tools
parentbpf: bpf_compute_data uses incorrect cb structure (diff)
downloadlinux-dev-bfa640757e9378c2f26867e723f1287e94f5a7ad.tar.xz
linux-dev-bfa640757e9378c2f26867e723f1287e94f5a7ad.zip
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>
Diffstat (limited to 'tools')
-rw-r--r--tools/include/uapi/linux/bpf.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
index 24b35a1fd4d6..c174971afbe6 100644
--- a/tools/include/uapi/linux/bpf.h
+++ b/tools/include/uapi/linux/bpf.h
@@ -787,8 +787,8 @@ struct xdp_md {
};
enum sk_action {
- SK_ABORTED = 0,
- SK_DROP,
+ SK_DROP = 0,
+ SK_PASS,
SK_REDIRECT,
};