1 // SPDX-License-Identifier: GPL-2.0
2 /* Converted from tools/testing/selftests/bpf/verifier/direct_stack_access_wraparound.c */
5 #include <bpf/bpf_helpers.h>
9 __description("direct stack access with 32-bit wraparound. test1")
10 __failure __msg("fp pointer and 2147483647")
12 __naked void with_32_bit_wraparound_test1(void)
19 *(u8*)(r1 + 0) = r0; \
25 __description("direct stack access with 32-bit wraparound. test2")
26 __failure __msg("fp pointer and 1073741823")
28 __naked void with_32_bit_wraparound_test2(void)
35 *(u8*)(r1 + 0) = r0; \
41 __description("direct stack access with 32-bit wraparound. test3")
42 __failure __msg("fp pointer offset 1073741822")
43 __msg_unpriv("R1 stack pointer arithmetic goes out of range")
44 __naked void with_32_bit_wraparound_test3(void)
51 *(u8*)(r1 + 0) = r0; \
56 char _license[] SEC("license") = "GPL";