linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next v2 0/3] arm64 BPF JIT Optimizations
@ 2020-05-08 18:15 Luke Nelson
  2020-05-08 18:15 ` [PATCH bpf-next v2 1/3] arm64: insn: Fix two bugs in encoding 32-bit logical immediates Luke Nelson
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Luke Nelson @ 2020-05-08 18:15 UTC (permalink / raw)
  To: bpf
  Cc: Mark Rutland, Song Liu, Catalin Marinas, Alexei Starovoitov,
	Will Deacon, Ard Biesheuvel, Daniel Borkmann, Marc Zyngier,
	John Fastabend, clang-built-linux, Zi Shen Lim, Yonghong Song,
	Andrii Nakryiko, Xi Wang, Luke Nelson, Alexios Zavras, KP Singh,
	Thomas Gleixner, linux-arm-kernel, netdev, linux-kernel,
	Martin KaFai Lau, Christoffer Dall

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.

v2:
 - Cleaned up patch to insn.c.
   (Marc Zyngier, Will Deacon) 

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      | 14 +++----
 arch/arm64/net/bpf_jit.h      | 22 +++++++++++
 arch/arm64/net/bpf_jit_comp.c | 73 ++++++++++++++++++++++++++++-------
 3 files changed, 88 insertions(+), 21 deletions(-)

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

-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

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

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-08 18:15 [PATCH bpf-next v2 0/3] arm64 BPF JIT Optimizations Luke Nelson
2020-05-08 18:15 ` [PATCH bpf-next v2 1/3] arm64: insn: Fix two bugs in encoding 32-bit logical immediates Luke Nelson
2020-05-08 18:15 ` [PATCH bpf-next v2 2/3] bpf, arm64: Optimize AND, OR, XOR, JSET BPF_K using arm64 " Luke Nelson
2020-05-08 18:15 ` [PATCH bpf-next v2 3/3] bpf, arm64: Optimize ADD, SUB, JMP BPF_K using arm64 add/sub immediates Luke Nelson
2020-05-11 12:55 ` [PATCH bpf-next v2 0/3] arm64 BPF JIT Optimizations Will Deacon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).