bpf/verifier: refactor checks for range computation
authorCupertino Miranda <cupertino.miranda@oracle.com>
Mon, 6 May 2024 14:18:45 +0000 (15:18 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 7 May 2024 00:09:11 +0000 (17:09 -0700)
commit0922c78f592c60e5a8fe6ab968479def124d4ff3
treec1b1bdf43c77e34bc31a2252067487e259a94e86
parentd786957ebd3fb4cfd9147dbcccd1e8f3871b45ce
bpf/verifier: refactor checks for range computation

Split range computation checks in its own function, isolating pessimitic
range set for dst_reg and failing return to a single point.

Signed-off-by: Cupertino Miranda <cupertino.miranda@oracle.com>
Acked-by: Eduard Zingerman <eddyz87@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>
Cc: Andrii Nakryiko <andrii.nakryiko@gmail.com>
bpf/verifier: improve code after range computation recent changes.
Link: https://lore.kernel.org/r/20240506141849.185293-3-cupertino.miranda@oracle.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/verifier.c