]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
bpf/verifier: relax MUL range computation check
authorCupertino Miranda <cupertino.miranda@oracle.com>
Mon, 6 May 2024 14:18:48 +0000 (15:18 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 7 May 2024 00:09:12 +0000 (17:09 -0700)
commit41d047a871062f1a4d1871a1908d380c14e75428
tree3461ffd9f5283a4ff853a704fb887b0d798ff767
parent5ec9a7d13f49b9c1c5ba854244d1f2ba414cf139
bpf/verifier: relax MUL range computation check

MUL instruction required that src_reg would be a known value (i.e.
src_reg would be a const value). The condition in this case can be
relaxed, since the range computation algorithm used in current code
already supports a proper range computation for any valid range value on
its operands.

Signed-off-by: Cupertino Miranda <cupertino.miranda@oracle.com>
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Acked-by: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: Yonghong Song <yonghong.song@linux.dev>
Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: David Faust <david.faust@oracle.com>
Cc: Jose Marchesi <jose.marchesi@oracle.com>
Cc: Elena Zannoni <elena.zannoni@oracle.com>
Link: https://lore.kernel.org/r/20240506141849.185293-6-cupertino.miranda@oracle.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/verifier.c