]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit37d3f6fa3d5fc2b736d2dd6168d0dee0fca8caa6
tree91fe11a7a0931e8b7c9d552ec61f351900cacd35
parent909bb44434dde6aab375246191eb873cc64f32d7
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