From: Eugene Syromyatnikov Date: Tue, 15 May 2018 12:04:11 +0000 (+0200) Subject: xlat: update bpf_attach_type constants X-Git-Tag: v4.23~146 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b532e92c6ea0f8b7dc6db455248c34f8376489b1;p=strace xlat: update bpf_attach_type constants * xlat/bpf_attach_type.in (BPF_SK_MSG_VERDICT): New constant, introduced by Linux commit v4.17-rc1~148^2~156^2~1^2~13. (BPF_CGROUP_INET4_BIND, BPF_CGROUP_INET6_BIND): New constants, introduced by Linux commit v4.17-rc1~148^2~19^2^2~6. (BPF_CGROUP_INET4_CONNECT, BPF_CGROUP_INET6_CONNECT): New constants, introduced by Linux commit v4.17-rc1~148^2~19^2^2~3. (BPF_CGROUP_INET4_POST_BIND, BPF_CGROUP_INET6_POST_BIND): New constants, introduced by Linux commit v4.17-rc1~148^2~19^2^2~1. * tests/bpf.c (BPF_PROG_QUERY_checks): Update expected output. --- diff --git a/tests/bpf.c b/tests/bpf.c index ce7dfe0c..72d0b4a8 100644 --- a/tests/bpf.c +++ b/tests/bpf.c @@ -848,13 +848,13 @@ static const struct bpf_attr_check BPF_PROG_QUERY_checks[] = { { /* 1 */ .data = { .BPF_PROG_QUERY_data = { .target_fd = 3141592653U, - .attach_type = 6, + .attach_type = 13, .query_flags = 1, .attach_flags = 3, } }, .size = offsetofend(struct BPF_PROG_QUERY_struct, attach_flags), .str = "query={target_fd=-1153374643" - ", attach_type=BPF_CGROUP_DEVICE" + ", attach_type=BPF_CGROUP_INET6_POST_BIND" ", query_flags=BPF_F_QUERY_EFFECTIVE" ", attach_flags=BPF_F_ALLOW_OVERRIDE|BPF_F_ALLOW_MULTI" ", prog_ids=NULL, prog_cnt=0}", @@ -862,7 +862,7 @@ static const struct bpf_attr_check BPF_PROG_QUERY_checks[] = { { /* 2 */ .data = { .BPF_PROG_QUERY_data = { .target_fd = 3141592653U, - .attach_type = 7, + .attach_type = 14, .query_flags = 0xfffffffe, .attach_flags = 0xfffffffc, .prog_ids = 0xffffffffffffffffULL, @@ -870,7 +870,7 @@ static const struct bpf_attr_check BPF_PROG_QUERY_checks[] = { } }, .size = offsetofend(struct BPF_PROG_QUERY_struct, prog_cnt), .str = "query={target_fd=-1153374643" - ", attach_type=0x7 /* BPF_??? */" + ", attach_type=0xe /* BPF_??? */" ", query_flags=0xfffffffe /* BPF_F_QUERY_??? */" ", attach_flags=0xfffffffc /* BPF_F_??? */" ", prog_ids=0xffffffffffffffff, prog_cnt=2718281828}", diff --git a/xlat/bpf_attach_type.in b/xlat/bpf_attach_type.in index 2f78992d..9438107c 100644 --- a/xlat/bpf_attach_type.in +++ b/xlat/bpf_attach_type.in @@ -6,3 +6,10 @@ BPF_CGROUP_SOCK_OPS 3 BPF_SK_SKB_STREAM_PARSER 4 BPF_SK_SKB_STREAM_VERDICT 5 BPF_CGROUP_DEVICE 6 +BPF_SK_MSG_VERDICT 7 +BPF_CGROUP_INET4_BIND 8 +BPF_CGROUP_INET6_BIND 9 +BPF_CGROUP_INET4_CONNECT 10 +BPF_CGROUP_INET6_CONNECT 11 +BPF_CGROUP_INET4_POST_BIND 12 +BPF_CGROUP_INET6_POST_BIND 13