Lines Matching refs:v
27 struct map_value *v; in size_not_bpf_dw() local
30 v = bpf_map_lookup_elem(&array_map, &key); in size_not_bpf_dw()
31 if (!v) in size_not_bpf_dw()
34 *(u32 *)&v->unref_ptr = 0; in size_not_bpf_dw()
42 struct map_value *v; in non_const_var_off() local
45 v = bpf_map_lookup_elem(&array_map, &key); in non_const_var_off()
46 if (!v) in non_const_var_off()
52 *(u64 *)((void *)v + id) = 0; in non_const_var_off()
61 struct map_value *v; in non_const_var_off_kptr_xchg() local
64 v = bpf_map_lookup_elem(&array_map, &key); in non_const_var_off_kptr_xchg()
65 if (!v) in non_const_var_off_kptr_xchg()
71 bpf_kptr_xchg((void *)v + id, NULL); in non_const_var_off_kptr_xchg()
80 struct map_value *v; in misaligned_access_write() local
83 v = bpf_map_lookup_elem(&array_map, &key); in misaligned_access_write()
84 if (!v) in misaligned_access_write()
87 *(void **)((void *)v + 7) = NULL; in misaligned_access_write()
96 struct map_value *v; in misaligned_access_read() local
99 v = bpf_map_lookup_elem(&array_map, &key); in misaligned_access_read()
100 if (!v) in misaligned_access_read()
103 return *(u64 *)((void *)v + 1); in misaligned_access_read()
111 struct map_value *v; in reject_var_off_store() local
114 v = bpf_map_lookup_elem(&array_map, &key); in reject_var_off_store()
115 if (!v) in reject_var_off_store()
118 unref_ptr = v->unref_ptr; in reject_var_off_store()
125 v->unref_ptr = unref_ptr; in reject_var_off_store()
135 struct map_value *v; in reject_bad_type_match() local
138 v = bpf_map_lookup_elem(&array_map, &key); in reject_bad_type_match()
139 if (!v) in reject_bad_type_match()
142 unref_ptr = v->unref_ptr; in reject_bad_type_match()
146 v->unref_ptr = unref_ptr; in reject_bad_type_match()
155 struct map_value *v; in marked_as_untrusted_or_null() local
158 v = bpf_map_lookup_elem(&array_map, &key); in marked_as_untrusted_or_null()
159 if (!v) in marked_as_untrusted_or_null()
162 bpf_this_cpu_ptr(v->unref_ptr); in marked_as_untrusted_or_null()
171 struct map_value *v; in correct_btf_id_check_size() local
174 v = bpf_map_lookup_elem(&array_map, &key); in correct_btf_id_check_size()
175 if (!v) in correct_btf_id_check_size()
178 p = v->unref_ptr; in correct_btf_id_check_size()
189 struct map_value *v; in inherit_untrusted_on_walk() local
192 v = bpf_map_lookup_elem(&array_map, &key); in inherit_untrusted_on_walk()
193 if (!v) in inherit_untrusted_on_walk()
196 unref_ptr = v->unref_ptr; in inherit_untrusted_on_walk()
208 struct map_value *v; in reject_kptr_xchg_on_unref() local
211 v = bpf_map_lookup_elem(&array_map, &key); in reject_kptr_xchg_on_unref()
212 if (!v) in reject_kptr_xchg_on_unref()
215 bpf_kptr_xchg(&v->unref_ptr, NULL); in reject_kptr_xchg_on_unref()
223 struct map_value *v; in mark_ref_as_untrusted_or_null() local
226 v = bpf_map_lookup_elem(&array_map, &key); in mark_ref_as_untrusted_or_null()
227 if (!v) in mark_ref_as_untrusted_or_null()
230 bpf_this_cpu_ptr(v->ref_ptr); in mark_ref_as_untrusted_or_null()
239 struct map_value *v; in reject_untrusted_store_to_ref() local
242 v = bpf_map_lookup_elem(&array_map, &key); in reject_untrusted_store_to_ref()
243 if (!v) in reject_untrusted_store_to_ref()
246 p = v->ref_ptr; in reject_untrusted_store_to_ref()
250 *(struct prog_test_ref_kfunc * volatile *)&v->ref_ptr = p; in reject_untrusted_store_to_ref()
259 struct map_value *v; in reject_untrusted_xchg() local
262 v = bpf_map_lookup_elem(&array_map, &key); in reject_untrusted_xchg()
263 if (!v) in reject_untrusted_xchg()
266 p = v->ref_ptr; in reject_untrusted_xchg()
269 bpf_kptr_xchg(&v->ref_ptr, p); in reject_untrusted_xchg()
279 struct map_value *v; in reject_bad_type_xchg() local
282 v = bpf_map_lookup_elem(&array_map, &key); in reject_bad_type_xchg()
283 if (!v) in reject_bad_type_xchg()
289 bpf_kptr_xchg(&v->ref_memb_ptr, ref_ptr); in reject_bad_type_xchg()
298 struct map_value *v; in reject_member_of_ref_xchg() local
301 v = bpf_map_lookup_elem(&array_map, &key); in reject_member_of_ref_xchg()
302 if (!v) in reject_member_of_ref_xchg()
308 bpf_kptr_xchg(&v->ref_memb_ptr, &ref_ptr->memb); in reject_member_of_ref_xchg()
316 struct map_value *v; in reject_indirect_helper_access() local
319 v = bpf_map_lookup_elem(&array_map, &key); in reject_indirect_helper_access()
320 if (!v) in reject_indirect_helper_access()
323 bpf_get_current_comm(v, sizeof(v->buf) + 1); in reject_indirect_helper_access()
337 struct map_value *v; in reject_indirect_global_func_access() local
340 v = bpf_map_lookup_elem(&array_map, &key); in reject_indirect_global_func_access()
341 if (!v) in reject_indirect_global_func_access()
344 return write_func((void *)v + 5); in reject_indirect_global_func_access()
352 struct map_value *v; in kptr_xchg_ref_state() local
355 v = bpf_map_lookup_elem(&array_map, &key); in kptr_xchg_ref_state()
356 if (!v) in kptr_xchg_ref_state()
362 bpf_kptr_xchg(&v->ref_ptr, p); in kptr_xchg_ref_state()
371 struct map_value *v; in kptr_xchg_possibly_null() local
374 v = bpf_map_lookup_elem(&array_map, &key); in kptr_xchg_possibly_null()
375 if (!v) in kptr_xchg_possibly_null()
381 p = bpf_kptr_xchg(&v->ref_ptr, p); in kptr_xchg_possibly_null()