]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: Add a test for ptr_to_map_value on stack for helper access
authorYonghong Song <yhs@fb.com>
Thu, 10 Dec 2020 01:33:50 +0000 (17:33 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 14 Dec 2020 20:50:10 +0000 (21:50 +0100)
commit2e5132c61b51a993ad3f7caa5366e26c1727f7a5
treee57bb1465df207af5c0987249b17c66606ca5e70
parentd306b1af561449fc2120a844751e51df9532c047
selftests/bpf: Add a test for ptr_to_map_value on stack for helper access

Change bpf_iter_task.c such that pointer to map_value may appear
on the stack for bpf_seq_printf() to access. Without previous
verifier patch, the bpf_iter test will fail.

Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Song Liu <songliubraving@fb.com>
Link: https://lore.kernel.org/bpf/20201210013350.943985-1-yhs@fb.com
tools/testing/selftests/bpf/progs/bpf_iter_task.c
tools/testing/selftests/bpf/verifier/unpriv.c