OSDN Git Service

selftests/bpf: Fix cgrp_local_storage on s390x
authorIlya Leoshkevich <iii@linux.ibm.com>
Sat, 28 Jan 2023 00:06:30 +0000 (01:06 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 28 Jan 2023 20:30:08 +0000 (12:30 -0800)
Sync the definition of socket_cookie between the eBPF program and the
test. Currently the test works by accident, since on little-endian it
is sometimes acceptable to access u64 as u32.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Link: https://lore.kernel.org/r/20230128000650.1516334-12-iii@linux.ibm.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/cgrp_local_storage.c

index 33a2776..2cc7599 100644 (file)
@@ -16,7 +16,7 @@
 
 struct socket_cookie {
        __u64 cookie_key;
-       __u32 cookie_value;
+       __u64 cookie_value;
 };
 
 static void test_tp_btf(int cgroup_fd)