BPF List
 help / color / mirror / Atom feed
* [PATCH bpf-next v1 0/2] Global subprogs in RCU/{preempt,irq}-disabled sections
@ 2025-02-28 16:28 Kumar Kartikeya Dwivedi
  2025-02-28 16:28 ` [PATCH bpf-next v1 1/2] bpf: Summarize sleepable global subprogs Kumar Kartikeya Dwivedi
  2025-02-28 16:28 ` [PATCH bpf-next v1 2/2] selftests/bpf: Test sleepable global subprogs in atomic contexts Kumar Kartikeya Dwivedi
  0 siblings, 2 replies; 11+ messages in thread
From: Kumar Kartikeya Dwivedi @ 2025-02-28 16:28 UTC (permalink / raw)
  To: bpf
  Cc: Alexei Starovoitov, Andrii Nakryiko, Daniel Borkmann,
	Martin KaFai Lau, Eduard Zingerman, kkd, kernel-team

Small change to allow non-sleepable global subprogs in
RCU, preempt-disabled, and irq-disabled sections. For
now, we don't lift the limitation for locks as it requires
more analysis, and will do this one resilient spin locks
land.

This surfaced a bug where sleepable global subprogs were
allowed in RCU read sections, that has been fixed. Tests
have been added to cover various cases.

Kumar Kartikeya Dwivedi (2):
  bpf: Summarize sleepable global subprogs
  selftests/bpf: Test sleepable global subprogs in atomic contexts

 include/linux/bpf_verifier.h                  |  1 +
 kernel/bpf/verifier.c                         | 50 ++++++++++-----
 .../selftests/bpf/prog_tests/rcu_read_lock.c  |  2 +
 .../selftests/bpf/prog_tests/spin_lock.c      |  2 +
 tools/testing/selftests/bpf/progs/irq.c       | 62 ++++++++++++++++++-
 .../selftests/bpf/progs/preempt_lock.c        | 40 +++++++++++-
 .../selftests/bpf/progs/rcu_read_lock.c       | 38 ++++++++++++
 .../selftests/bpf/progs/test_spin_lock_fail.c | 40 ++++++++++++
 8 files changed, 219 insertions(+), 16 deletions(-)


base-commit: 0b9363131daf4227d5ae11ee677acdcfff06e938
-- 
2.43.5


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

end of thread, other threads:[~2025-03-01  1:44 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-28 16:28 [PATCH bpf-next v1 0/2] Global subprogs in RCU/{preempt,irq}-disabled sections Kumar Kartikeya Dwivedi
2025-02-28 16:28 ` [PATCH bpf-next v1 1/2] bpf: Summarize sleepable global subprogs Kumar Kartikeya Dwivedi
2025-02-28 20:42   ` Eduard Zingerman
2025-02-28 20:47     ` Kumar Kartikeya Dwivedi
2025-02-28 23:18   ` Andrii Nakryiko
2025-02-28 23:23     ` Eduard Zingerman
2025-02-28 23:34       ` Andrii Nakryiko
2025-02-28 23:57         ` Eduard Zingerman
2025-03-01  1:43           ` Kumar Kartikeya Dwivedi
2025-02-28 16:28 ` [PATCH bpf-next v1 2/2] selftests/bpf: Test sleepable global subprogs in atomic contexts Kumar Kartikeya Dwivedi
2025-02-28 21:21   ` Eduard Zingerman

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