]> git.ipfire.org Git - thirdparty/linux.git/commit
bpf: Consistently use reg_state() for register access in the verifier
authorMykyta Yatsenko <yatsenko@meta.com>
Tue, 13 Jan 2026 13:48:26 +0000 (13:48 +0000)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 13 Jan 2026 17:31:17 +0000 (09:31 -0800)
commit7af3339948601e188d93d7e03326aeb8fcbd6bea
tree17ada3ca4478ef45a6d09e2b674022ff88e298c3
parent9c1a3525fd64839d71e0c1a21170003a4621e6e8
bpf: Consistently use reg_state() for register access in the verifier

Replace the pattern of declaring a local regs array from cur_regs()
and then indexing into it with the more concise reg_state() helper.
This simplifies the code by eliminating intermediate variables and
makes register access more consistent throughout the verifier.

Signed-off-by: Mykyta Yatsenko <yatsenko@meta.com>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20260113134826.2214860-1-mykyta.yatsenko5@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/verifier.c