Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
selftests/bpf: Add selftest for packet-pointer Spectre v1 gadget
When allowing speculative leaks by enabling packet pointer accesses without CAP_PERFMON (i.e., without having [1] reverted): $ tools/testing/selftests/bpf/test_progs --name=tc_bpf tc_bpf_non_root:PASS:set_cap_bpf_cap_net_admin 0 nsec tc_bpf_non_root:PASS:disable_cap_sys_admin 0 nsec tc_bpf_non_root:FAIL:test_tc_bpf__open_and_load unexpected pointer: 0x55bbd81969a0 Summary: 0/1 PASSED, 0 SKIPPED, 1 FAILED With [1] reverted: $ tools/testing/selftests/bpf/test_progs --name=tc_bpf torvalds#238/1 tc_bpf/tc_bpf_root:OK torvalds#238/2 tc_bpf/tc_bpf_non_root:OK torvalds#238 tc_bpf:OK Summary: 1/2 PASSED, 0 SKIPPED, 0 FAILED [1] d75e30d ("bpf: Fix issue in verifying allow_ptr_leaks") Signed-off-by: Luis Gerhorst <gerhorst@amazon.de> Signed-off-by: Luis Gerhorst <gerhorst@cs.fau.de> Based-on-patch-by: Yafang Shao <laoar.shao@gmail.com>
- Loading branch information