]> git.itanic.dy.fi Git - linux-stable/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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Mar 2022 12:21:46 +0000 (13:21 +0100)
commitdcf55b071de9231e197ba7b1a2d0a423e8d7d33a
tree1ae10d1c38b7939c843d57845d9fcbaa68be16e7
parente0eca9285cf4fd45437e139333e0fdbfa3e8b89f
selftests/bpf: Add test for bpf_timer overwriting crash

[ Upstream commit a7e75016a0753c24d6c995bc02501ae35368e333 ]

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
Signed-off-by: Sasha Levin <sashal@kernel.org>
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]