]> granicus.if.org Git - strace/commitdiff
xlat: update BPF_F_* constants
authorDmitry V. Levin <ldv@altlinux.org>
Thu, 3 Jan 2019 23:36:22 +0000 (23:36 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Sat, 5 Jan 2019 21:14:42 +0000 (21:14 +0000)
* xlat/bpf_map_flags.in (BPF_F_ZERO_SEED): New constant introduced
by Linux kernel commit v5.0-rc1~129^2~114^2~18^2~3.
* xlat/bpf_prog_flags.in (BPF_F_ANY_ALIGNMENT): New constant introduced
by Linux kernel commit v5.0-rc1~129^2~209^2~17^2~3.
* NEWS: Mention this.
* tests/bpf.c (BPF_MAP_CREATE_checks, BPF_PROG_LOAD_checks,
print_BPF_PROG_LOAD_attr3, print_BPF_PROG_LOAD_attr4): Update.

NEWS
tests/bpf.c
xlat/bpf_map_flags.in
xlat/bpf_prog_flags.in

diff --git a/NEWS b/NEWS
index 616d594e3268e074400b58dba7bd5f4d888e8b01..f4b5b4b62cd10b78a6e39eef20b2efb3de9b91f8 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,9 @@
 Noteworthy changes in release ?.?? (????-??-??)
 ===============================================
 
+* Improvements
+  * Updated the list of BPF_* constants.
+
 * Bug fixes
   * Fixed strace-k test on alpha.
 
index d19416835cf73da63dee98a7ab02b00f8b449de5..cfed31913627fa3afea20688a8b4f558d9f5adbd 100644 (file)
@@ -282,7 +282,7 @@ static struct bpf_attr_check BPF_MAP_CREATE_checks[] = {
                        .key_size = 0xface1e55,
                        .value_size = 0xbadc0ded,
                        .max_entries = 0xbeefcafe,
-                       .map_flags = 0xffffffc0,
+                       .map_flags = 0xffffff80,
                        .inner_map_fd = 2718281828,
                        .numa_node = -1,
                        .map_name = "",
@@ -292,7 +292,7 @@ static struct bpf_attr_check BPF_MAP_CREATE_checks[] = {
                .str = "map_type=0x18 /* BPF_MAP_TYPE_??? */"
                       ", key_size=4207812181, value_size=3134983661"
                       ", max_entries=3203386110"
-                      ", map_flags=0xffffffc0 /* BPF_F_??? */"
+                      ", map_flags=0xffffff80 /* BPF_F_??? */"
                       ", inner_map_fd=-1576685468"
                       ", map_name=\"\", map_ifindex=3141592653",
 
@@ -531,7 +531,7 @@ print_BPF_PROG_LOAD_attr3(const struct bpf_attr_check *check, unsigned long addr
               ", insns=" INSNS_FMT ", license=\"%s\", log_level=2718281828"
               ", log_size=%u, log_buf=%p"
               ", kern_version=KERNEL_VERSION(51966, 240, 13)"
-              ", prog_flags=0x2 /* BPF_F_??? */"
+              ", prog_flags=0x4 /* BPF_F_??? */"
               ", prog_name=\"0123456789abcde\"..., prog_ifindex=3203399405",
               (unsigned int) ARRAY_SIZE(insns), INSNS_ARG, license,
               log_buf_size, get_log_buf_tail());
@@ -557,7 +557,7 @@ print_BPF_PROG_LOAD_attr4(const struct bpf_attr_check *check, unsigned long addr
               ", license=\"%s\", log_level=2718281828, log_size=4"
               ", log_buf=\"log \"..."
               ", kern_version=KERNEL_VERSION(51966, 240, 13)"
-              ", prog_flags=BPF_F_STRICT_ALIGNMENT|0x2"
+              ", prog_flags=BPF_F_STRICT_ALIGNMENT|BPF_F_ANY_ALIGNMENT|0x4"
               ", prog_name=\"0123456789abcde\"..., prog_ifindex=%s"
               ", expected_attach_type=BPF_CGROUP_INET6_BIND",
               (unsigned int) ARRAY_SIZE(insns), INSNS_ARG,
@@ -621,7 +621,7 @@ static struct bpf_attr_check BPF_PROG_LOAD_checks[] = {
                        .log_level = 2718281828U,
                        .log_size = log_buf_size,
                        .kern_version = 0xcafef00d,
-                       .prog_flags = 2,
+                       .prog_flags = 4,
                        .prog_name = "0123456789abcdef",
                        .prog_ifindex = 0xbeeffeed,
                } },
@@ -636,7 +636,7 @@ static struct bpf_attr_check BPF_PROG_LOAD_checks[] = {
                        .log_level = 2718281828U,
                        .log_size = 4,
                        .kern_version = 0xcafef00d,
-                       .prog_flags = 3,
+                       .prog_flags = 7,
                        .prog_name = "0123456789abcdef",
                        .expected_attach_type = 9,
                } },
index a8f405b33f48d6373bcb5757ba195f5e9ca49020..a2790db65cf5411779f07313d417e9a1ae37d1b9 100644 (file)
@@ -1,6 +1,7 @@
-BPF_F_NO_PREALLOC      1
-BPF_F_NO_COMMON_LRU    2
-BPF_F_NUMA_NODE                4
+BPF_F_NO_PREALLOC      1U
+BPF_F_NO_COMMON_LRU    (1U << 1)
+BPF_F_NUMA_NODE                (1U << 2)
 BPF_F_RDONLY           (1U << 3)
 BPF_F_WRONLY           (1U << 4)
 BPF_F_STACK_BUILD_ID   (1U << 5)
+BPF_F_ZERO_SEED                (1U << 6)
index 7fcf3a7a93ec11869a52bb356640ecc3772e24ed..e9eb42aa431cd4e5443fe9d520a6bad7843fc1ab 100644 (file)
@@ -1 +1,2 @@
-BPF_F_STRICT_ALIGNMENT 1
+BPF_F_STRICT_ALIGNMENT 1U
+BPF_F_ANY_ALIGNMENT    (1U << 1)