]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
bpf: clean up visit_insn()'s instruction processing
authorAndrii Nakryiko <andrii@kernel.org>
Thu, 2 Mar 2023 23:50:04 +0000 (15:50 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Jan 2024 16:10:29 +0000 (17:10 +0100)
commitb1c780ed3c220b0e3dbb1426e0f716bf0afbf7a3
treedbad6c4725c7995681d20e0e61b2469f09b1a58c
parent97bb6dab01728e5a5f4eca998efd91bc89403032
bpf: clean up visit_insn()'s instruction processing

[ Upstream commit 653ae3a874aca6764a4c1f5a8bf1b072ade0d6f4 ]

Instead of referencing processed instruction repeatedly as insns[t]
throughout entire visit_insn() function, take a local insn pointer and
work with it in a cleaner way.

It makes enhancing this function further a bit easier as well.

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20230302235015.2044271-7-andrii@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Stable-dep-of: 3feb263bb516 ("bpf: handle ldimm64 properly in check_cfg()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/bpf/verifier.c