public inbox for bpf@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/8] Allocate bpf trampoline on bpf_prog_pack
@ 2023-09-20  5:31 Song Liu
  2023-09-20  5:31 ` [PATCH bpf-next 1/8] s390/bpf: Let arch_prepare_bpf_trampoline return program size Song Liu
                   ` (7 more replies)
  0 siblings, 8 replies; 17+ messages in thread
From: Song Liu @ 2023-09-20  5:31 UTC (permalink / raw)
  To: bpf; +Cc: ast, daniel, andrii, martin.lau, kernel-team, Song Liu

This set enables allocating bpf trampoline from bpf_prog_pack on x86. The
majority of this work, however, is the refactoring of trampoline code.
This is needed because we need to handle 4 archs and 2 users (trampoline
and struct_ops).

1/8 is a dependency that is already applied to bpf tree.
2/8 through 7/8 refactors trampoline code. A few helpers are added.
8/8 finally let bpf trampoline on x86 use bpf_prog_pack.

Song Liu (8):
  s390/bpf: Let arch_prepare_bpf_trampoline return program size
  bpf: Let bpf_prog_pack_free handle any pointer
  bpf: Adjust argument names of arch_prepare_bpf_trampoline()
  bpf: Add helpers for trampoline image management
  bpf, x86: Adjust arch_prepare_bpf_trampoline return value
  bpf: Add arch_bpf_trampoline_size()
  bpf: Use arch_bpf_trampoline_size for trampoline
  x86, bpf: Use bpf_prog_pack for bpf trampoline

 arch/arm64/net/bpf_jit_comp.c   |  62 +++++++++++-----
 arch/riscv/net/bpf_jit_comp64.c |  24 ++++--
 arch/s390/net/bpf_jit_comp.c    |  52 +++++++------
 arch/x86/net/bpf_jit_comp.c     | 127 +++++++++++++++++++++++++-------
 include/linux/bpf.h             |  12 ++-
 include/linux/filter.h          |   2 +-
 kernel/bpf/bpf_struct_ops.c     |  12 ++-
 kernel/bpf/core.c               |  21 +++---
 kernel/bpf/dispatcher.c         |   5 +-
 kernel/bpf/trampoline.c         |  89 ++++++++++++++++------
 10 files changed, 285 insertions(+), 121 deletions(-)

--
2.34.1

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

end of thread, other threads:[~2023-09-21 17:26 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-20  5:31 [PATCH bpf-next 0/8] Allocate bpf trampoline on bpf_prog_pack Song Liu
2023-09-20  5:31 ` [PATCH bpf-next 1/8] s390/bpf: Let arch_prepare_bpf_trampoline return program size Song Liu
2023-09-20  5:31 ` [PATCH bpf-next 2/8] bpf: Let bpf_prog_pack_free handle any pointer Song Liu
2023-09-20  5:31 ` [PATCH bpf-next 3/8] bpf: Adjust argument names of arch_prepare_bpf_trampoline() Song Liu
2023-09-20  5:31 ` [PATCH bpf-next 4/8] bpf: Add helpers for trampoline image management Song Liu
2023-09-20 16:31   ` Song Liu
2023-09-20  5:31 ` [PATCH bpf-next 5/8] bpf, x86: Adjust arch_prepare_bpf_trampoline return value Song Liu
2023-09-20  5:31 ` [PATCH bpf-next 6/8] bpf: Add arch_bpf_trampoline_size() Song Liu
2023-09-20  7:39   ` Xu Kuohai
2023-09-20 15:56     ` Song Liu
2023-09-21  0:45   ` Pu Lehui
2023-09-21  5:12     ` Song Liu
2023-09-21 14:07   ` Jiri Olsa
2023-09-21 14:24   ` Jiri Olsa
2023-09-21 14:28     ` Jiri Olsa
2023-09-20  5:31 ` [PATCH bpf-next 7/8] bpf: Use arch_bpf_trampoline_size for trampoline Song Liu
2023-09-20  5:31 ` [PATCH bpf-next 8/8] x86, bpf: Use bpf_prog_pack for bpf trampoline Song Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox