All of lore.kernel.org
 help / color / mirror / Atom feed
* [RESEND PATCH bpf-next 0/2] Jit BPF_CALL to direct call when possible
@ 2022-09-19  9:21 ` Xu Kuohai
  0 siblings, 0 replies; 12+ messages in thread
From: Xu Kuohai @ 2022-09-19  9:21 UTC (permalink / raw)
  To: bpf, linux-arm-kernel, linux-kernel
  Cc: Daniel Borkmann, Jean-Philippe Brucker, Alexei Starovoitov,
	Andrii Nakryiko, Martin KaFai Lau, Song Liu, Yonghong Song,
	John Fastabend, KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa,
	Zi Shen Lim, Catalin Marinas, Will Deacon

Currently BPF_CALL is always jited to indirect call, but when target is
in the range of direct call, a BPF_CALL can be jited to direct call.

For example, the following BPF_CALL

    call __htab_map_lookup_elem

is always jited to an indirect call:

    mov     x10, #0xffffffffffff18f4
    movk    x10, #0x821, lsl #16
    movk    x10, #0x8000, lsl #32
    blr     x10

When the target is in the range of a direct call, it can be jited to:

    bl      0xfffffffffd33bc98

This patchset does such jit.

Xu Kuohai (2):
  bpf, arm64: Jit BPF_CALL to direct call when possible
  bpf, arm64: Eliminate false -EFBIG error in bpf trampoline

 arch/arm64/net/bpf_jit_comp.c | 136 ++++++++++++++++++++++------------
 1 file changed, 87 insertions(+), 49 deletions(-)

-- 
2.30.2


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

end of thread, other threads:[~2022-10-13  2:09 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-19  9:21 [RESEND PATCH bpf-next 0/2] Jit BPF_CALL to direct call when possible Xu Kuohai
2022-09-19  9:21 ` Xu Kuohai
2022-09-19  9:21 ` [RESEND PATCH bpf-next 1/2] bpf, arm64: " Xu Kuohai
2022-09-19  9:21   ` Xu Kuohai
2022-09-26 20:29   ` Daniel Borkmann
2022-09-26 20:29     ` Daniel Borkmann
2022-09-27 14:01     ` Xu Kuohai
2022-09-27 14:01       ` Xu Kuohai
2022-10-13  2:07       ` Xu Kuohai
2022-10-13  2:07         ` Xu Kuohai
2022-09-19  9:21 ` [RESEND PATCH bpf-next 2/2] bpf, arm64: Eliminate false -EFBIG error in bpf trampoline Xu Kuohai
2022-09-19  9:21   ` Xu Kuohai

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.