diff options
author | 2023-06-13 18:38:24 +0300 | |
---|---|---|
committer | 2023-06-13 15:15:13 -0700 | |
commit | 18b89265572b5c899522b6c1f8698e87edfad369 (patch) | |
tree | b54adfd56be610fc6423c01aaf05b1364fb91a23 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | bpf: Verify scalar ids mapping in regsafe() using check_ids() (diff) | |
download | wireguard-linux-18b89265572b5c899522b6c1f8698e87edfad369.tar.xz wireguard-linux-18b89265572b5c899522b6c1f8698e87edfad369.zip |
selftests/bpf: Verify that check_ids() is used for scalars in regsafe()
Verify that the following example is rejected by verifier:
r9 = ... some pointer with range X ...
r6 = ... unbound scalar ID=a ...
r7 = ... unbound scalar ID=b ...
if (r6 > r7) goto +1
r7 = r6
if (r7 > X) goto exit
r9 += r6
*(u64 *)r9 = Y
Also add test cases to:
- check that check_alu_op() for BPF_MOV instruction does not allocate
scalar ID if source register is a constant;
- check that unique scalar IDs are ignored when new verifier state is
compared to cached verifier state;
- check that two different scalar IDs in a verified state can't be
mapped to the same scalar ID in current state.
Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20230613153824.3324830-5-eddyz87@gmail.com
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions