summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/progs/verifier_array_access.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-03-10 07:31:51 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-03-10 07:31:51 +0100
commit046cc01be6b9d139b49dfc396b7201c633ff1a26 (patch)
tree529f902da1c2ef691ac83491547d816704ac1a83 /tools/testing/selftests/bpf/progs/verifier_array_access.c
parent74fc34937d72d04e89e4f75ea66147cdc9b785f5 (diff)
parent80e54e84911a923c40d7bee33a34c1b4be148d7a (diff)
downloadlinux-next-046cc01be6b9d139b49dfc396b7201c633ff1a26.tar.gz
linux-next-046cc01be6b9d139b49dfc396b7201c633ff1a26.zip
Merge 6.14-rc6 into char-misc-next
We need the fixes in here as well to build on top of. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/verifier_array_access.c')
-rw-r--r--tools/testing/selftests/bpf/progs/verifier_array_access.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/progs/verifier_array_access.c b/tools/testing/selftests/bpf/progs/verifier_array_access.c
index 29eb9568633f..0a187ff725cc 100644
--- a/tools/testing/selftests/bpf/progs/verifier_array_access.c
+++ b/tools/testing/selftests/bpf/progs/verifier_array_access.c
@@ -713,4 +713,19 @@ unsigned int non_stack_key_lookup(void)
return val->index;
}
+SEC("socket")
+__description("doesn't reject UINT64_MAX as s64 for irrelevant maps")
+__success __retval(42)
+unsigned int doesnt_reject_irrelevant_maps(void)
+{
+ __u64 key = 0xFFFFFFFFFFFFFFFF;
+ struct test_val *val;
+
+ val = bpf_map_lookup_elem(&map_hash_48b, &key);
+ if (val)
+ return val->index;
+
+ return 42;
+}
+
char _license[] SEC("license") = "GPL";