BPF List
 help / color / mirror / Atom feed
* [PATCH bpf-next v1 0/2] Fix global subprog verification context
@ 2026-09-05  3:40 Kumar Kartikeya Dwivedi
  2026-09-05  3:40 ` [PATCH bpf-next v1 1/2] bpf: Verify global subprogs in each sleepability context Kumar Kartikeya Dwivedi
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Kumar Kartikeya Dwivedi @ 2026-09-05  3:40 UTC (permalink / raw)
  To: bpf
  Cc: Alexei Starovoitov, Andrii Nakryiko, Daniel Borkmann,
	Eduard Zingerman, Emil Tsalapatis, Nicholas Carlini, kkd,
	kernel-team

Global subprogs can be invoked in both sleepable and non-sleepable
contexts, but are verified based on context assumptions for the program
type as a whole and not the precise context in which they are invoked.
Nicholas identified that this can cause verifier's safety assumptions to
be violated. Implement a fix by performing verification twice but only
if different contexts are exercised, and add selftests to ensure coverage.

Kumar Kartikeya Dwivedi (2):
  bpf: Verify global subprogs in each sleepability context
  selftests/bpf: Test global subprog callback contexts

 include/linux/bpf.h                           |   5 +-
 kernel/bpf/verifier.c                         |  76 ++++++----
 .../bpf/progs/verifier_async_cb_context.c     | 131 ++++++++++++++++++
 3 files changed, 180 insertions(+), 32 deletions(-)


base-commit: 3ccdb07813829ba9487273e75d1cb238cfa774c1
-- 
2.53.0


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

end of thread, other threads:[~2026-09-05  4:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-05  3:40 [PATCH bpf-next v1 0/2] Fix global subprog verification context Kumar Kartikeya Dwivedi
2026-09-05  3:40 ` [PATCH bpf-next v1 1/2] bpf: Verify global subprogs in each sleepability context Kumar Kartikeya Dwivedi
2026-09-05  3:54   ` sashiko-bot
2026-09-05  4:39   ` bot+bpf-ci
2026-09-05  3:40 ` [PATCH bpf-next v1 2/2] selftests/bpf: Test global subprog callback contexts Kumar Kartikeya Dwivedi
2026-09-05  4:39   ` bot+bpf-ci
2026-09-05  4:33 ` [PATCH bpf-next v1 0/2] Fix global subprog verification context Kumar Kartikeya Dwivedi

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