]> granicus.if.org Git - strace/commitdiff
xlat: update bpf_attach_type constants
authorEugene Syromyatnikov <evgsyr@gmail.com>
Tue, 15 May 2018 12:04:11 +0000 (14:04 +0200)
committerDmitry V. Levin <ldv@altlinux.org>
Sat, 19 May 2018 09:15:27 +0000 (09:15 +0000)
* 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.

tests/bpf.c
xlat/bpf_attach_type.in

index ce7dfe0c1e759c15444709128ee34b3d4074da6f..72d0b4a87719ac7237ecfdf1d4cb72fa1a84a7bb 100644 (file)
@@ -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}",
index 2f78992d68186dba24112db3f962b38198105042..9438107c41203536d542f6ec6ab7cf33351208bb 100644 (file)
@@ -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