]> git.baikalelectronics.ru Git - kernel.git/commit
bpf, x64: save 5 bytes in prologue when ebpf insns came from cbpf
authorDaniel Borkmann <daniel@iogearbox.net>
Sat, 24 Feb 2018 00:08:02 +0000 (01:08 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 24 Feb 2018 06:50:00 +0000 (22:50 -0800)
commitfed450b4fa78fdbb4ebb94e7a1675eeb778be1eb
treefabeb650153a6cc3c2bc1fdefbe47f44cebf56e2
parentb9685677c7a598e860a2fecc21cbf03b05675cab
bpf, x64: save 5 bytes in prologue when ebpf insns came from cbpf

While it's rather cumbersome to reduce prologue for cBPF->eBPF
migrations wrt spill/fill for r15 which is callee saved register
due to bpf_error path in bpf_jit.S that is both used by migrations
as well as native eBPF, we can still trivially save 5 bytes in
prologue for the former since tail calls can never be used there.
cBPF->eBPF migrations also have their own custom prologue in BPF
asm that xors A and X reg anyway, so it's fine we skip this here.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
arch/x86/net/bpf_jit_comp.c