selftests/bpf: Add test cases to assert proper ID tracking on spill
authorMaxim Mikityanskiy <maxim@isovalent.com>
Wed, 7 Jun 2023 12:39:51 +0000 (15:39 +0300)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 8 Jun 2023 08:28:30 +0000 (10:28 +0200)
commitf57ade27fc3eae16eab0f1edba1248ced429b2f0
tree94de84ebbf8da269be11202588c216351e9db45c
parent713274f1f2c896d37017efee333fd44149710119
selftests/bpf: Add test cases to assert proper ID tracking on spill

The previous commit fixed a verifier bypass by ensuring that ID is not
preserved on narrowing spills. Add the test cases to check the
problematic patterns.

Signed-off-by: Maxim Mikityanskiy <maxim@isovalent.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20230607123951.558971-3-maxtram95@gmail.com
tools/testing/selftests/bpf/progs/verifier_spill_fill.c