]> www.infradead.org Git - users/dwmw2/linux.git/commit
selftests/bpf: Add UAF tests for arena atomics
authorIlya Leoshkevich <iii@linux.ibm.com>
Mon, 1 Jul 2024 23:40:29 +0000 (01:40 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 2 Jul 2024 16:31:52 +0000 (18:31 +0200)
commit490c99d4ed99bb01dac8bf2896e27941403549c4
tree7ae6854096191d17f8368bf5ce95fc8c658c48e9
parentb6349fd3448cf349af327f90585a712d60265429
selftests/bpf: Add UAF tests for arena atomics

Check that __sync_*() functions don't cause kernel panics when handling
freed arena pages.

x86_64 does not support some arena atomics yet, and aarch64 may or may
not support them, based on the availability of LSE atomics at run time.
Do not enable this test for these architectures for simplicity.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20240701234304.14336-12-iii@linux.ibm.com
tools/testing/selftests/bpf/prog_tests/arena_atomics.c
tools/testing/selftests/bpf/progs/arena_atomics.c