Lines Matching refs:v
30 struct map_value *v; in size_not_bpf_dw() local
33 v = bpf_map_lookup_elem(&array_map, &key); in size_not_bpf_dw()
34 if (!v) in size_not_bpf_dw()
37 *(u32 *)&v->unref_ptr = 0; in size_not_bpf_dw()
45 struct map_value *v; in non_const_var_off() local
48 v = bpf_map_lookup_elem(&array_map, &key); in non_const_var_off()
49 if (!v) in non_const_var_off()
55 *(u64 *)((void *)v + id) = 0; in non_const_var_off()
64 struct map_value *v; in non_const_var_off_kptr_xchg() local
67 v = bpf_map_lookup_elem(&array_map, &key); in non_const_var_off_kptr_xchg()
68 if (!v) in non_const_var_off_kptr_xchg()
74 bpf_kptr_xchg((void *)v + id, NULL); in non_const_var_off_kptr_xchg()
83 struct map_value *v; in misaligned_access_write() local
86 v = bpf_map_lookup_elem(&array_map, &key); in misaligned_access_write()
87 if (!v) in misaligned_access_write()
90 *(void **)((void *)v + 7) = NULL; in misaligned_access_write()
99 struct map_value *v; in misaligned_access_read() local
102 v = bpf_map_lookup_elem(&array_map, &key); in misaligned_access_read()
103 if (!v) in misaligned_access_read()
106 return *(u64 *)((void *)v + 1); in misaligned_access_read()
114 struct map_value *v; in reject_var_off_store() local
117 v = bpf_map_lookup_elem(&array_map, &key); in reject_var_off_store()
118 if (!v) in reject_var_off_store()
121 unref_ptr = v->unref_ptr; in reject_var_off_store()
128 v->unref_ptr = unref_ptr; in reject_var_off_store()
138 struct map_value *v; in reject_bad_type_match() local
141 v = bpf_map_lookup_elem(&array_map, &key); in reject_bad_type_match()
142 if (!v) in reject_bad_type_match()
145 unref_ptr = v->unref_ptr; in reject_bad_type_match()
149 v->unref_ptr = unref_ptr; in reject_bad_type_match()
158 struct map_value *v; in marked_as_untrusted_or_null() local
161 v = bpf_map_lookup_elem(&array_map, &key); in marked_as_untrusted_or_null()
162 if (!v) in marked_as_untrusted_or_null()
165 bpf_this_cpu_ptr(v->unref_ptr); in marked_as_untrusted_or_null()
174 struct map_value *v; in correct_btf_id_check_size() local
177 v = bpf_map_lookup_elem(&array_map, &key); in correct_btf_id_check_size()
178 if (!v) in correct_btf_id_check_size()
181 p = v->unref_ptr; in correct_btf_id_check_size()
192 struct map_value *v; in inherit_untrusted_on_walk() local
195 v = bpf_map_lookup_elem(&array_map, &key); in inherit_untrusted_on_walk()
196 if (!v) in inherit_untrusted_on_walk()
199 unref_ptr = v->unref_ptr; in inherit_untrusted_on_walk()
211 struct map_value *v; in reject_kptr_xchg_on_unref() local
214 v = bpf_map_lookup_elem(&array_map, &key); in reject_kptr_xchg_on_unref()
215 if (!v) in reject_kptr_xchg_on_unref()
218 bpf_kptr_xchg(&v->unref_ptr, NULL); in reject_kptr_xchg_on_unref()
242 struct map_value *v; in reject_kptr_get_no_kptr() local
245 v = bpf_map_lookup_elem(&array_map, &key); in reject_kptr_get_no_kptr()
246 if (!v) in reject_kptr_get_no_kptr()
249 bpf_kfunc_call_test_kptr_get((void *)v, 0, 0); in reject_kptr_get_no_kptr()
257 struct map_value *v; in reject_kptr_get_on_unref() local
260 v = bpf_map_lookup_elem(&array_map, &key); in reject_kptr_get_on_unref()
261 if (!v) in reject_kptr_get_on_unref()
264 bpf_kfunc_call_test_kptr_get(&v->unref_ptr, 0, 0); in reject_kptr_get_on_unref()
272 struct map_value *v; in reject_kptr_get_bad_type_match() local
275 v = bpf_map_lookup_elem(&array_map, &key); in reject_kptr_get_bad_type_match()
276 if (!v) in reject_kptr_get_bad_type_match()
279 bpf_kfunc_call_test_kptr_get((void *)&v->ref_memb_ptr, 0, 0); in reject_kptr_get_bad_type_match()
287 struct map_value *v; in mark_ref_as_untrusted_or_null() local
290 v = bpf_map_lookup_elem(&array_map, &key); in mark_ref_as_untrusted_or_null()
291 if (!v) in mark_ref_as_untrusted_or_null()
294 bpf_this_cpu_ptr(v->ref_ptr); in mark_ref_as_untrusted_or_null()
303 struct map_value *v; in reject_untrusted_store_to_ref() local
306 v = bpf_map_lookup_elem(&array_map, &key); in reject_untrusted_store_to_ref()
307 if (!v) in reject_untrusted_store_to_ref()
310 p = v->ref_ptr; in reject_untrusted_store_to_ref()
314 *(struct prog_test_ref_kfunc * volatile *)&v->ref_ptr = p; in reject_untrusted_store_to_ref()
323 struct map_value *v; in reject_untrusted_xchg() local
326 v = bpf_map_lookup_elem(&array_map, &key); in reject_untrusted_xchg()
327 if (!v) in reject_untrusted_xchg()
330 p = v->ref_ptr; in reject_untrusted_xchg()
333 bpf_kptr_xchg(&v->ref_ptr, p); in reject_untrusted_xchg()
343 struct map_value *v; in reject_bad_type_xchg() local
346 v = bpf_map_lookup_elem(&array_map, &key); in reject_bad_type_xchg()
347 if (!v) in reject_bad_type_xchg()
353 bpf_kptr_xchg(&v->ref_memb_ptr, ref_ptr); in reject_bad_type_xchg()
362 struct map_value *v; in reject_member_of_ref_xchg() local
365 v = bpf_map_lookup_elem(&array_map, &key); in reject_member_of_ref_xchg()
366 if (!v) in reject_member_of_ref_xchg()
372 bpf_kptr_xchg(&v->ref_memb_ptr, &ref_ptr->memb); in reject_member_of_ref_xchg()
380 struct map_value *v; in reject_indirect_helper_access() local
383 v = bpf_map_lookup_elem(&array_map, &key); in reject_indirect_helper_access()
384 if (!v) in reject_indirect_helper_access()
387 bpf_get_current_comm(v, sizeof(v->buf) + 1); in reject_indirect_helper_access()
401 struct map_value *v; in reject_indirect_global_func_access() local
404 v = bpf_map_lookup_elem(&array_map, &key); in reject_indirect_global_func_access()
405 if (!v) in reject_indirect_global_func_access()
408 return write_func((void *)v + 5); in reject_indirect_global_func_access()
416 struct map_value *v; in kptr_xchg_ref_state() local
419 v = bpf_map_lookup_elem(&array_map, &key); in kptr_xchg_ref_state()
420 if (!v) in kptr_xchg_ref_state()
426 bpf_kptr_xchg(&v->ref_ptr, p); in kptr_xchg_ref_state()
434 struct map_value *v; in kptr_get_ref_state() local
437 v = bpf_map_lookup_elem(&array_map, &key); in kptr_get_ref_state()
438 if (!v) in kptr_get_ref_state()
441 bpf_kfunc_call_test_kptr_get(&v->ref_ptr, 0, 0); in kptr_get_ref_state()