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

From: Tejun Heo

Date: Tue Sep 08 2026 - 17:18:42 EST


Hello, Tao.

On Tue, 08 Sep 2026 18:01:38 +0800, Tao Cui wrote:

> +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