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
This commit is contained in:
Maxim Mikityanskiy 2023-06-07 15:39:51 +03:00 • committed by Daniel Borkmann
commit f57ade27fc