Re: [RFC PATCH 3/8] blk-iocost: implement BPF struct_ops registration

From
Tejun Heo <tj@kernel.org>
Date
2026-09-08 21:03:36
Also in
bpf, linux-block, linux-kselftest, lkml
Reply to
Tao Cui, 2026-09-08
Hello, Tao.

On Tue, 08 Sep 2026 18:01:38 +0800, Tao Cui wrote:
quoted hunk ↗ jump to hunk
+static struct bpf_struct_ops bpf_iocost_model_ops = {
+	.verifier_ops = &bpf_iocost_verifier_ops,
+	.init = bpf_iocost_model_init,
+	.init_member = bpf_iocost_init_member,
Please add a .check_member callback rejecting sleepable programs. The
generic verifier permits sleepable struct_ops programs, so a model can
currently call bpf_copy_from_user() while iocost_bpf_calc_cost() holds
rcu_read_lock().

Thanks.

-- 
tejun
Thread (16 messages) 16 messages, 2 authors, last reply 2026-09-09
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help