bpf: Make BPF and PREEMPT_RT co-exist
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest22 patches 6 repliesIn review
- v220 patches 3 repliesSuperseded
- v11 patch 0 repliesSuperseded
Patches in v3 No applies recorded yet
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.
Cover letter [patch V3 00/22] bpf: Make BPF and PREEMPT_RT co-exist
Hi!
This is the third version of the BPF/RT patch set which makes both coexist nicely. The long explanation can be found in the cover letter of the V1 submission:
https://lore.kernel.org/r/[email protected]
V2 is here:
https://lore.kernel.org/r/[email protected]
The following changes vs. V2 have been made:
- Rebased to bpf-next, adjusted to the lock changes in the hashmap code.
- Split the preallocation enforcement patch for instrumentation type BPF programs into two pieces:
1) Emit a one-time warning on !RT kernels when any instrumentation type BPF program uses run-time allocation. Emit also a corresponding warning in the verifier log. But allow the program to run for backward compatibility sake. After a grace period this should be enforced.
2) On RT reject such programs because on RT the memory allocator cannot be called from truly atomic contexts.
- Fixed the fallout from V2 as reported by Alexei and 0-day
- Removed the redundant preempt_disable() from trace_call_bpf()
- Removed the unused export of trace_call_bpf()
The series applies on top of:
git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
Selftest result:
# Summary: 1580 PASSED, 0 SKIPPED, 0 FAILED
Thanks,
tglx
--- include/linux/bpf.h | 38 ++++++++- include/linux/filter.h | 37 +++++++-- kernel/bpf/hashtab.c | 172 ++++++++++++++++++++++++++++++------------- kernel/bpf/lpm_trie.c | 12 +-- kernel/bpf/percpu_freelist.c | 20 ++--- kernel/bpf/stackmap.c | 18 +++- kernel/bpf/syscall.c | 27 ++---- kernel/bpf/trampoline.c | 9 +- kernel/bpf/verifier.c | 40 +++++++--- kernel/events/core.c | 2 kernel/seccomp.c | 4 - kernel/trace/bpf_trace.c | 7 - lib/test_bpf.c | 4 - net/bpf/test_run.c | 8 +- net/core/flow_dissector.c | 4 - net/core/skmsg.c | 8 -- net/kcm/kcmsock.c | 4 - 17 files changed, 274 insertions(+), 140 deletions(-)