]> git.ipfire.org Git - people/ms/linux.git/commit - arch/x86/net/bpf_jit_comp.c
bpf: Reserve space for BPF trampoline in BPF programs
authorAlexei Starovoitov <ast@kernel.org>
Thu, 14 Nov 2019 18:57:13 +0000 (10:57 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 15 Nov 2019 22:44:06 +0000 (23:44 +0100)
commit9fd4a39dc7fe734d26eb89ea97e8c91331c6378c
tree5783728bdca357b04e48d656d84eb07b1624a4a8
parente76d776e9ca1fe266b3a7f8091eee5d1e635a545
bpf: Reserve space for BPF trampoline in BPF programs

BPF trampoline can be made to work with existing 5 bytes of BPF program
prologue, but let's add 5 bytes of NOPs to the beginning of every JITed BPF
program to make BPF trampoline job easier. They can be removed in the future.

Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Acked-by: Song Liu <songliubraving@fb.com>
Link: https://lore.kernel.org/bpf/20191114185720.1641606-14-ast@kernel.org
arch/x86/net/bpf_jit_comp.c