]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: Add test for bpf_timer overwriting crash
authorKumar Kartikeya Dwivedi <memxor@gmail.com>
Wed, 9 Feb 2022 07:03:24 +0000 (12:33 +0530)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 11 Feb 2022 21:13:04 +0000 (13:13 -0800)
commit68613f3eefda9d32c8ec8193dd37560070fc1344
tree54d657bc7593fa1eae529ceec59827dd754b5d32
parente61c5520a8880231661620d5423bef955a3f7c20
selftests/bpf: Add test for bpf_timer overwriting crash

Add a test that validates that timer value is not overwritten when doing
a copy_map_value call in the kernel. Without the prior fix, this test
triggers a crash.

Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20220209070324.1093182-3-memxor@gmail.com
tools/testing/selftests/bpf/prog_tests/timer_crash.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/timer_crash.c [new file with mode: 0644]