]> git.baikalelectronics.ru Git - kernel.git/commit
bpf, x86: Generalize and extend bpf_arch_text_poke for direct jumps
authorDaniel Borkmann <daniel@iogearbox.net>
Fri, 22 Nov 2019 20:07:54 +0000 (21:07 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 25 Nov 2019 00:58:47 +0000 (16:58 -0800)
commit77df55384dcd9550f2d6e1a57603077803109cde
tree3c65c1076f917574a67c3ee1c4de18364549bebc
parent952501bbe621ebaceeafc1a4d122637597ea5990
bpf, x86: Generalize and extend bpf_arch_text_poke for direct jumps

Add BPF_MOD_{NOP_TO_JUMP,JUMP_TO_JUMP,JUMP_TO_NOP} patching for x86
JIT in order to be able to patch direct jumps or nop them out. We need
this facility in order to patch tail call jumps and in later work also
BPF static keys.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Link: https://lore.kernel.org/bpf/aa4784196a8e5e985af4b30a4fe5336bce6e9643.1574452833.git.daniel@iogearbox.net
arch/x86/net/bpf_jit_comp.c
include/linux/bpf.h