Netdev List
 help / color / mirror / Atom feed
* [PATCH bpf 0/3] bpf: Reject sleepable struct_ops programs in atomic context
@ 2026-11-24 14:31 Sechang Lim
  2026-11-24 14:31 ` [PATCH bpf 1/3] bpf: Reject sleepable programs in bpf-tcp-cc Sechang Lim
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Sechang Lim @ 2026-11-24 14:31 UTC (permalink / raw)
  To: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
	Martin KaFai Lau
  Cc: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Simon Horman, Jamal Hadi Salim, Jiri Pirko, Amery Hung, Cong Wang,
	Toke Høiland-Jørgensen, D . Wythe, Dust Li,
	Sidraya Jayagond, Mahanta Jambigi, Tony Lu, Wen Gu, David Vernet,
	bpf, netdev, linux-rdma, linux-s390

Any struct_ops program can be loaded as sleepable, and it is up to each
struct_ops to reject that in check_member for members that run in
atomic context. tcp_congestion_ops, Qdisc_ops and smc_hs_ctrl have no
check_member, although the kernel calls their members in softirq, under
a spinlock or under rcu_read_lock(). A sleepable program attached there
is entered through __bpf_prog_enter_sleepable(), and lockdep reports
"BUG: Invalid wait context" at its might_fault().

This series adds a check_member that rejects sleepable programs to each
of them, like bpf_tcp_ops does.

Sechang Lim (3):
  bpf: Reject sleepable programs in bpf-tcp-cc
  bpf: net_sched: Reject sleepable programs in bpf qdisc
  net/smc: bpf: Reject sleepable programs in smc_hs_ctrl

 net/ipv4/bpf_tcp_ca.c | 11 +++++++++++
 net/sched/bpf_qdisc.c | 11 +++++++++++
 net/smc/smc_hs_bpf.c  | 11 +++++++++++
 3 files changed, 33 insertions(+)

-- 
2.56.1


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

end of thread, other threads:[~2026-11-24 21:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-24 14:31 [PATCH bpf 0/3] bpf: Reject sleepable struct_ops programs in atomic context Sechang Lim
2026-11-24 14:31 ` [PATCH bpf 1/3] bpf: Reject sleepable programs in bpf-tcp-cc Sechang Lim
2026-11-24 14:31 ` [PATCH bpf 2/3] bpf: net_sched: Reject sleepable programs in bpf qdisc Sechang Lim
2026-11-24 14:31 ` [PATCH bpf 3/3] net/smc: bpf: Reject sleepable programs in smc_hs_ctrl Sechang Lim
2026-11-24 21:06 ` [PATCH bpf 0/3] bpf: Reject sleepable struct_ops programs in atomic context Alexei Starovoitov

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