All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 bpf-next 0/5] bpf: Light skeleton for the kernel.
@ 2022-02-08 19:13 Alexei Starovoitov
  2022-02-08 19:13 ` [PATCH v2 bpf-next 1/5] bpf: Extend sys_bpf commands for bpf_syscall programs Alexei Starovoitov
                   ` (5 more replies)
  0 siblings, 6 replies; 19+ messages in thread
From: Alexei Starovoitov @ 2022-02-08 19:13 UTC (permalink / raw)
  To: davem; +Cc: daniel, andrii, bpf, kernel-team

From: Alexei Starovoitov <ast@kernel.org>

The libbpf performs a set of complex operations to load BPF programs.
With "loader program" and "CO-RE in the kernel" the loading job of
libbpf was diminished. The light skeleton became lean enough to perform
program loading and map creation tasks without libbpf.
It's now possible to tweak it further to make light skeleton usable
out of user space and out of kernel module.
This allows bpf_preload.ko to drop user-mode-driver usage,
drop host compiler dependency, allow cross compilation and simplify the code.
It's a building block toward safe and portable kernel modules.

v1->v2:
- removed redundant anon struct and added comments (Andrii's reivew)
- added Yonghong's ack
- fixed build warning when JIT is off

Alexei Starovoitov (5):
  bpf: Extend sys_bpf commands for bpf_syscall programs.
  libbpf: Prepare light skeleton for the kernel.
  bpftool: Generalize light skeleton generation.
  bpf: Update iterators.lskel.h.
  bpf: Convert bpf_preload.ko to use light skeleton.

 kernel/bpf/inode.c                            |  39 +---
 kernel/bpf/preload/Kconfig                    |   9 +-
 kernel/bpf/preload/Makefile                   |  14 +-
 kernel/bpf/preload/bpf_preload.h              |   8 +-
 kernel/bpf/preload/bpf_preload_kern.c         | 119 +++++------
 kernel/bpf/preload/bpf_preload_umd_blob.S     |   7 -
 .../preload/iterators/bpf_preload_common.h    |  13 --
 kernel/bpf/preload/iterators/iterators.c      | 108 ----------
 .../bpf/preload/iterators/iterators.lskel.h   |  28 +--
 kernel/bpf/syscall.c                          |  40 +++-
 tools/bpf/bpftool/gen.c                       |  45 ++--
 tools/lib/bpf/skel_internal.h                 | 193 ++++++++++++++++--
 12 files changed, 319 insertions(+), 304 deletions(-)
 delete mode 100644 kernel/bpf/preload/bpf_preload_umd_blob.S
 delete mode 100644 kernel/bpf/preload/iterators/bpf_preload_common.h
 delete mode 100644 kernel/bpf/preload/iterators/iterators.c

-- 
2.30.2


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

end of thread, other threads:[~2022-02-09  5:14 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-08 19:13 [PATCH v2 bpf-next 0/5] bpf: Light skeleton for the kernel Alexei Starovoitov
2022-02-08 19:13 ` [PATCH v2 bpf-next 1/5] bpf: Extend sys_bpf commands for bpf_syscall programs Alexei Starovoitov
2022-02-08 19:13 ` [PATCH v2 bpf-next 2/5] libbpf: Prepare light skeleton for the kernel Alexei Starovoitov
2022-02-09  0:13   ` Yonghong Song
2022-02-09  0:44     ` Alexei Starovoitov
2022-02-09  1:27       ` Yonghong Song
2022-02-08 19:13 ` [PATCH v2 bpf-next 3/5] bpftool: Generalize light skeleton generation Alexei Starovoitov
2022-02-09  0:25   ` Yonghong Song
2022-02-09  0:52     ` Alexei Starovoitov
2022-02-09  1:38       ` Yonghong Song
2022-02-08 19:13 ` [PATCH v2 bpf-next 4/5] bpf: Update iterators.lskel.h Alexei Starovoitov
2022-02-09  0:27   ` Yonghong Song
2022-02-09  4:40   ` Andrii Nakryiko
2022-02-09  5:05     ` Alexei Starovoitov
2022-02-08 19:13 ` [PATCH v2 bpf-next 5/5] bpf: Convert bpf_preload.ko to use light skeleton Alexei Starovoitov
2022-02-09  0:53   ` Yonghong Song
2022-02-09  0:59     ` Alexei Starovoitov
2022-02-09  1:41       ` Yonghong Song
2022-02-09  4:41 ` [PATCH v2 bpf-next 0/5] bpf: Light skeleton for the kernel Andrii Nakryiko

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.