]> Gentwo Git Trees - linux/.git/commit
bpf, x86: allow indirect jumps to r8...r15
authorAnton Protopopov <a.s.protopopov@gmail.com>
Wed, 5 Nov 2025 09:04:05 +0000 (09:04 +0000)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 6 Nov 2025 01:53:22 +0000 (17:53 -0800)
commit5bef46ac9c574d6d37d53dd802f7dbf677141fc2
tree3361c5749f8119358079a28dd8f79d1f55fe848c
parentae48162a667b79fba19296e5f2ee4d6602c809f5
bpf, x86: allow indirect jumps to r8...r15

Currently the emit_indirect_jump() function only accepts one of the
RAX, RCX, ..., RBP registers as the destination. Make it to accept
R8, R9, ..., R15 as well, and make callers to pass BPF registers, not
native registers. This is required to enable indirect jumps support
in eBPF.

Signed-off-by: Anton Protopopov <a.s.protopopov@gmail.com>
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/r/20251105090410.1250500-8-a.s.protopopov@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
arch/x86/net/bpf_jit_comp.c