]> www.infradead.org Git - users/jedix/linux-maple.git/commit
selftests/bpf: Add test for reading from STACK_INVALID slots
authorKumar Kartikeya Dwivedi <memxor@gmail.com>
Wed, 4 Dec 2024 04:47:56 +0000 (20:47 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 4 Dec 2024 17:19:50 +0000 (09:19 -0800)
commitf513c3635078fc184af66b1af9e4f2b2d19b7d79
treeb2baa9ad325ba3ff54a3b55d7eda554baea0ed59
parentadfdd9c68566120debc622712888c4d084539081
selftests/bpf: Add test for reading from STACK_INVALID slots

Ensure that when CAP_PERFMON is dropped, and the verifier sees
allow_ptr_leaks as false, we are not permitted to read from a
STACK_INVALID slot. Without the fix, the test will report unexpected
success in loading.

Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/r/20241204044757.1483141-5-memxor@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/progs/verifier_spill_fill.c