bpf: enforce precision of R0 on program/async callback return
authorAndrii Nakryiko <andrii@kernel.org>
Sat, 2 Dec 2023 17:57:02 +0000 (09:57 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 2 Dec 2023 19:36:51 +0000 (11:36 -0800)
commiteabe518de533a4291996020977054a7a7b78c7d3
treea07050432051b4354f9e6ad2d932405c036f3d9b
parent0ef24c8dfae24a4b8aa2e92eac20faecdc5502e5
bpf: enforce precision of R0 on program/async callback return

Given we enforce a valid range for program and async callback return
value, we must mark R0 as precise to avoid incorrect state pruning.

Fixes: b5dc0163d8fd ("bpf: precise scalar_value tracking")
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20231202175705.885270-9-andrii@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/verifier.c