bpf: Make 32->64 bounds propagation slightly more robust
authorDaniel Borkmann <daniel@iogearbox.net>
Wed, 15 Dec 2021 22:28:48 +0000 (22:28 +0000)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 16 Dec 2021 18:45:56 +0000 (19:45 +0100)
commite572ff80f05c33cd0cb4860f864f5c9c044280b6
tree91fe11a7a0931e8b7c9d552ec61f351900cacd35
parent3cf2b61eb06765e27fec6799292d9fb46d0b7e60
bpf: Make 32->64 bounds propagation slightly more robust

Make the bounds propagation in __reg_assign_32_into_64() slightly more
robust and readable by aligning it similarly as we did back in the
__reg_combine_64_into_32() counterpart. Meaning, only propagate or
pessimize them as a smin/smax pair.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/verifier.c