]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
selftests/bpf: track string payload offset as scalar in strobemeta
authorEduard Zingerman <eddyz87@gmail.com>
Tue, 21 Nov 2023 02:06:52 +0000 (04:06 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 21 Nov 2023 02:33:35 +0000 (18:33 -0800)
commit87eb0152bcc102ecbda866978f4e54db5a3be1ef
tree25716ce657f2157c4a6fdf1dd0ecce6a1279f23b
parent977bc146d4eb7070118d8a974919b33bb52732b4
selftests/bpf: track string payload offset as scalar in strobemeta

This change prepares strobemeta for update in callbacks verification
logic. To allow bpf_loop() verification converge when multiple
callback iterations are considered:
- track offset inside strobemeta_payload->payload directly as scalar
  value;
- at each iteration make sure that remaining
  strobemeta_payload->payload capacity is sufficient for execution of
  read_{map,str}_var functions;
- make sure that offset is tracked as unbound scalar between
  iterations, otherwise verifier won't be able infer that bpf_loop
  callback reaches identical states.

Acked-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/r/20231121020701.26440-3-eddyz87@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/progs/strobemeta.h