All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/3] bpf: Consolidate sleepable context checks in verifier
@ 2026-03-18 17:43 Puranjay Mohan
  2026-03-18 17:43 ` [PATCH bpf-next 1/3] bpf: Consolidate sleepable checks in check_helper_call() Puranjay Mohan
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Puranjay Mohan @ 2026-03-18 17:43 UTC (permalink / raw)
  To: bpf
  Cc: Puranjay Mohan, Puranjay Mohan, Alexei Starovoitov,
	Andrii Nakryiko, Daniel Borkmann, Martin KaFai Lau,
	Eduard Zingerman, Kumar Kartikeya Dwivedi, Mykyta Yatsenko,
	kernel-team

The BPF verifier has multiple call-checking functions that independently
validate whether sleepable operations are permitted in the current
context. Each function open-codes its own checks against active_rcu_locks,
active_preempt_locks, active_irq_id, and in_sleepable, duplicating the
logic already provided by in_sleepable_context().

This series consolidates these scattered checks into calls to
in_sleepable_context() across check_helper_call(), check_kfunc_call(),
and check_func_call(), reducing code duplication and making the error
reporting consistent. No functional change.

Puranjay Mohan (3):
  bpf: Consolidate sleepable checks in check_helper_call()
  bpf: Consolidate sleepable checks in check_kfunc_call()
  bpf: Consolidate sleepable checks in check_func_call()

 kernel/bpf/verifier.c                         | 91 +++++++------------
 .../selftests/bpf/prog_tests/summarization.c  |  2 +-
 tools/testing/selftests/bpf/progs/irq.c       |  4 +-
 .../selftests/bpf/progs/preempt_lock.c        |  6 +-
 .../bpf/progs/verifier_async_cb_context.c     |  4 +-
 5 files changed, 43 insertions(+), 64 deletions(-)


base-commit: 77378dabb50f593c756d393d8eacb0b91b758863
-- 
2.52.0


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

end of thread, other threads:[~2026-03-21 20:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-18 17:43 [PATCH bpf-next 0/3] bpf: Consolidate sleepable context checks in verifier Puranjay Mohan
2026-03-18 17:43 ` [PATCH bpf-next 1/3] bpf: Consolidate sleepable checks in check_helper_call() Puranjay Mohan
2026-03-19  9:56   ` Kumar Kartikeya Dwivedi
2026-03-18 17:43 ` [PATCH bpf-next 2/3] bpf: Consolidate sleepable checks in check_kfunc_call() Puranjay Mohan
2026-03-19  9:57   ` Kumar Kartikeya Dwivedi
2026-03-18 17:43 ` [PATCH bpf-next 3/3] bpf: Consolidate sleepable checks in check_func_call() Puranjay Mohan
2026-03-19  9:57   ` Kumar Kartikeya Dwivedi
2026-03-21 20:20 ` [PATCH bpf-next 0/3] bpf: Consolidate sleepable context checks in verifier patchwork-bot+netdevbpf

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.