Thread (36 messages) 36 messages, 4 authors, 2021-12-19

Re: [PATCH bpf-next v4 05/10] bpf: Add reference tracking support to kfunc

From: Alexei Starovoitov <hidden>
Date: 2021-12-19 02:22:52
Also in: bpf, netfilter-devel

On Fri, Dec 17, 2021 at 07:20:26AM +0530, Kumar Kartikeya Dwivedi wrote:
quoted hunk ↗ jump to hunk
diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index 965fffaf0308..015cb633838b 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -521,6 +521,9 @@ struct bpf_verifier_ops {
 				 enum bpf_access_type atype,
 				 u32 *next_btf_id);
 	bool (*check_kfunc_call)(u32 kfunc_btf_id, struct module *owner);
+	bool (*is_acquire_kfunc)(u32 kfunc_btf_id, struct module *owner);
+	bool (*is_release_kfunc)(u32 kfunc_btf_id, struct module *owner);
+	bool (*is_kfunc_ret_type_null)(u32 kfunc_btf_id, struct module *owner);
Same feedback as before...

Those callbacks are not necessary.
The existing check_kfunc_call() is just as inconvenient.
When module's BTF comes in could you add it to mod's info instead of
introducing callbacks for every kind of data the module has.
Those callbacks don't server any purpose other than passing the particular
data set back. The verifier side should access those data sets directly.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help