All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH bpf-next 0/3] arm64 BPF JIT Optimizations
@ 2020-05-07  1:05 ` Luke Nelson
  0 siblings, 0 replies; 24+ messages in thread
From: Luke Nelson @ 2020-05-07  1:05 UTC (permalink / raw)
  To: bpf
  Cc: Luke Nelson, Xi Wang, Catalin Marinas, Will Deacon,
	Daniel Borkmann, Alexei Starovoitov, Zi Shen Lim,
	Martin KaFai Lau, Song Liu, Yonghong Song, Andrii Nakryiko,
	John Fastabend, KP Singh, Mark Rutland, Greg Kroah-Hartman,
	Allison Randal, Ard Biesheuvel, Thomas Gleixner, Marc Zyngier,
	Christoffer Dall, linux-arm-kernel, linux-kernel, netdev,
	clang-built-linux

This patch series introduces several optimizations to the arm64 BPF JIT.
The optimizations make use of arm64 immediate instructions to avoid
loading BPF immediates to temporary registers, when possible.

In the process, we discovered two bugs in the logical immediate encoding
function in arch/arm64/kernel/insn.c using Serval. The series also fixes
the two bugs before introducing the optimizations.

Tested on aarch64 QEMU virt machine using test_bpf and test_verifier.

Luke Nelson (3):
  arm64: insn: Fix two bugs in encoding 32-bit logical immediates
  bpf, arm64: Optimize AND,OR,XOR,JSET BPF_K using arm64 logical
    immediates
  bpf, arm64: Optimize ADD,SUB,JMP BPF_K using arm64 add/sub immediates

 arch/arm64/kernel/insn.c      |  6 ++-
 arch/arm64/net/bpf_jit.h      | 22 +++++++++++
 arch/arm64/net/bpf_jit_comp.c | 73 ++++++++++++++++++++++++++++-------
 3 files changed, 85 insertions(+), 16 deletions(-)

Cc: Xi Wang <xi.wang@gmail.com>

-- 
2.17.1


^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2020-05-08 18:12 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-07  1:05 [RFC PATCH bpf-next 0/3] arm64 BPF JIT Optimizations Luke Nelson
2020-05-07  1:05 ` Luke Nelson
2020-05-07  1:05 ` [RFC PATCH bpf-next 1/3] arm64: insn: Fix two bugs in encoding 32-bit logical immediates Luke Nelson
2020-05-07  1:05   ` Luke Nelson
2020-05-07  8:19   ` Marc Zyngier
2020-05-07  8:19     ` Marc Zyngier
2020-05-07  8:29   ` Will Deacon
2020-05-07  8:29     ` Will Deacon
2020-05-07  9:12     ` Marc Zyngier
2020-05-07  9:12       ` Marc Zyngier
2020-05-07 21:48       ` Luke Nelson
2020-05-07 21:48         ` Luke Nelson
2020-05-08 11:47         ` Will Deacon
2020-05-08 11:47           ` Will Deacon
2020-05-08 18:12           ` Luke Nelson
2020-05-08 18:12             ` Luke Nelson
2020-05-07  1:05 ` [RFC PATCH bpf-next 2/3] bpf, arm64: Optimize AND,OR,XOR,JSET BPF_K using arm64 " Luke Nelson
2020-05-07  1:05   ` [RFC PATCH bpf-next 2/3] bpf, arm64: Optimize AND, OR, XOR, JSET " Luke Nelson
2020-05-07 20:19   ` [RFC PATCH bpf-next 2/3] bpf, arm64: Optimize AND,OR,XOR,JSET " Daniel Borkmann
2020-05-07 20:19     ` Daniel Borkmann
2020-05-07  1:05 ` [RFC PATCH bpf-next 3/3] bpf, arm64: Optimize ADD,SUB,JMP BPF_K using arm64 add/sub immediates Luke Nelson
2020-05-07  1:05   ` [RFC PATCH bpf-next 3/3] bpf, arm64: Optimize ADD, SUB, JMP " Luke Nelson
2020-05-07 20:22   ` [RFC PATCH bpf-next 3/3] bpf, arm64: Optimize ADD,SUB,JMP " Daniel Borkmann
2020-05-07 20:22     ` Daniel Borkmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.