]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
bpf: Support new 32bit offset jmp instruction
authorYonghong Song <yonghong.song@linux.dev>
Fri, 28 Jul 2023 01:12:31 +0000 (18:12 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Jan 2024 16:10:29 +0000 (17:10 +0100)
commit2c795ce09042c9c84f97907b5a95e09895c69686
tree26162757fdfa4d0a08859900381f54a0ee350932
parentb1c780ed3c220b0e3dbb1426e0f716bf0afbf7a3
bpf: Support new 32bit offset jmp instruction

[ Upstream commit 4cd58e9af8b9d9fff6b7145e742abbfcda0af4af ]

Add interpreter/jit/verifier support for 32bit offset jmp instruction.
If a conditional jmp instruction needs more than 16bit offset,
it can be simulated with a conditional jmp + a 32bit jmp insn.

Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20230728011231.3716103-1-yonghong.song@linux.dev
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>
arch/x86/net/bpf_jit_comp.c
kernel/bpf/core.c
kernel/bpf/verifier.c