bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch V3 00/22] bpf: Make BPF and PREEMPT_RT co-exist
@ 2020-02-24 14:01 Thomas Gleixner
  2020-02-24 14:01 ` [patch V3 01/22] bpf: Tighten the requirements for preallocated hash maps Thomas Gleixner
                   ` (21 more replies)
  0 siblings, 22 replies; 30+ messages in thread
From: Thomas Gleixner @ 2020-02-24 14:01 UTC (permalink / raw)
  To: LKML
  Cc: David Miller, bpf, netdev, Alexei Starovoitov, Daniel Borkmann,
	Sebastian Sewior, Peter Zijlstra, Clark Williams, Steven Rostedt,
	Juri Lelli, Ingo Molnar, Mathieu Desnoyers, Vinicius Costa Gomes,
	Jakub Kicinski

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/20200214133917.304937432@linutronix.de

V2 is here:

  https://lore.kernel.org/r/20200220204517.863202864@linutronix.de

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(-)

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

end of thread, other threads:[~2020-02-25 12:36 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-24 14:01 [patch V3 00/22] bpf: Make BPF and PREEMPT_RT co-exist Thomas Gleixner
2020-02-24 14:01 ` [patch V3 01/22] bpf: Tighten the requirements for preallocated hash maps Thomas Gleixner
2020-02-24 14:01 ` [patch V3 02/22] bpf: Enforce preallocation for instrumentation programs on RT Thomas Gleixner
2020-02-24 14:01 ` [patch V3 03/22] bpf: Update locking comment in hashtab code Thomas Gleixner
2020-02-24 14:01 ` [patch V3 04/22] bpf/tracing: Remove redundant preempt_disable() in __bpf_trace_run() Thomas Gleixner
2020-02-24 14:01 ` [patch V3 05/22] bpf/trace: Remove EXPORT from trace_call_bpf() Thomas Gleixner
2020-02-24 18:16   ` Alexei Starovoitov
2020-02-24 14:01 ` [patch V3 06/22] bpf/trace: Remove redundant preempt_disable " Thomas Gleixner
2020-02-24 19:40   ` Alexei Starovoitov
2020-02-24 20:42     ` Thomas Gleixner
2020-02-25  0:33       ` Alexei Starovoitov
2020-02-25 12:36         ` Thomas Gleixner
2020-02-24 14:01 ` [patch V3 07/22] perf/bpf: Remove preempt disable around BPF invocation Thomas Gleixner
2020-02-24 14:01 ` [patch V3 08/22] bpf: Remove recursion prevention from rcu free callback Thomas Gleixner
2020-02-24 14:01 ` [patch V3 09/22] bpf: Dont iterate over possible CPUs with interrupts disabled Thomas Gleixner
2020-02-24 14:01 ` [patch V3 10/22] bpf: Provide bpf_prog_run_pin_on_cpu() helper Thomas Gleixner
2020-02-24 18:14   ` Thomas Gleixner
2020-02-24 18:41   ` [patch V4 " Thomas Gleixner
2020-02-24 14:01 ` [patch V3 11/22] bpf: Replace cant_sleep() with cant_migrate() Thomas Gleixner
2020-02-24 14:01 ` [patch V3 12/22] bpf: Use bpf_prog_run_pin_on_cpu() at simple call sites Thomas Gleixner
2020-02-24 14:01 ` [patch V3 13/22] bpf/tests: Use migrate disable instead of preempt disable Thomas Gleixner
2020-02-24 14:01 ` [patch V3 14/22] bpf: Use migrate_disable/enabe() in trampoline code Thomas Gleixner
2020-02-24 14:01 ` [patch V3 15/22] bpf: Use migrate_disable/enable in array macros and cgroup/lirc code Thomas Gleixner
2020-02-24 14:01 ` [patch V3 16/22] bpf: Provide recursion prevention helpers Thomas Gleixner
2020-02-24 14:01 ` [patch V3 17/22] bpf: Use recursion prevention helpers in hashtab code Thomas Gleixner
2020-02-24 14:01 ` [patch V3 18/22] bpf: Replace open coded recursion prevention in sys_bpf() Thomas Gleixner
2020-02-24 14:01 ` [patch V3 19/22] bpf: Factor out hashtab bucket lock operations Thomas Gleixner
2020-02-24 14:01 ` [patch V3 20/22] bpf: Prepare hashtab locking for PREEMPT_RT Thomas Gleixner
2020-02-24 14:01 ` [patch V3 21/22] bpf, lpm: Make locking RT friendly Thomas Gleixner
2020-02-24 14:01 ` [patch V3 22/22] bpf/stackmap: Dont trylock mmap_sem with PREEMPT_RT and interrupts disabled Thomas Gleixner

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).