Home
last modified time | relevance | path

Searched refs:aux (Results 1 – 25 of 28) sorted by relevance

12

/kernel/bpf/
Dcore.c88 struct bpf_prog_aux *aux; in bpf_prog_alloc_no_stats() local
96 aux = kzalloc(sizeof(*aux), GFP_KERNEL_ACCOUNT | gfp_extra_flags); in bpf_prog_alloc_no_stats()
97 if (aux == NULL) { in bpf_prog_alloc_no_stats()
104 kfree(aux); in bpf_prog_alloc_no_stats()
109 fp->aux = aux; in bpf_prog_alloc_no_stats()
110 fp->aux->prog = fp; in bpf_prog_alloc_no_stats()
114 aux->cgroup_atype = CGROUP_BPF_ATTACH_TYPE_INVALID; in bpf_prog_alloc_no_stats()
117 INIT_LIST_HEAD_RCU(&fp->aux->ksym.lnode); in bpf_prog_alloc_no_stats()
118 mutex_init(&fp->aux->used_maps_mutex); in bpf_prog_alloc_no_stats()
119 mutex_init(&fp->aux->dst_mutex); in bpf_prog_alloc_no_stats()
[all …]
Dcgroup_iter.c162 static int cgroup_iter_seq_init(void *priv, struct bpf_iter_aux_info *aux) in BTF_ID_LIST_SINGLE()
165 struct cgroup *cgrp = aux->cgroup.start; in BTF_ID_LIST_SINGLE()
176 p->order = aux->cgroup.order; in BTF_ID_LIST_SINGLE()
196 struct bpf_iter_aux_info *aux) in bpf_iter_attach_cgroup() argument
222 aux->cgroup.start = cgrp; in bpf_iter_attach_cgroup()
223 aux->cgroup.order = order; in bpf_iter_attach_cgroup()
227 static void bpf_iter_detach_cgroup(struct bpf_iter_aux_info *aux) in bpf_iter_detach_cgroup() argument
229 cgroup_put(aux->cgroup.start); in bpf_iter_detach_cgroup()
232 static void bpf_iter_cgroup_show_fdinfo(const struct bpf_iter_aux_info *aux, in bpf_iter_cgroup_show_fdinfo() argument
248 cgroup_path_ns(aux->cgroup.start, buf, PATH_MAX, in bpf_iter_cgroup_show_fdinfo()
[all …]
Darraymap.c650 struct bpf_iter_aux_info *aux) in bpf_iter_init_array_map() argument
653 struct bpf_map *map = aux->map; in bpf_iter_init_array_map()
846 mutex_lock(&array->aux->poke_mutex); in bpf_fd_array_map_update_elem()
849 mutex_unlock(&array->aux->poke_mutex); in bpf_fd_array_map_update_elem()
869 mutex_lock(&array->aux->poke_mutex); in fd_array_map_delete_elem()
872 mutex_unlock(&array->aux->poke_mutex); in fd_array_map_delete_elem()
908 return ((struct bpf_prog *)ptr)->aux->id; in prog_fd_array_sys_lookup_elem()
946 struct bpf_prog_aux *aux; member
953 struct bpf_array_aux *aux; in prog_array_map_poke_track() local
956 aux = container_of(map, struct bpf_array, map)->aux; in prog_array_map_poke_track()
[all …]
Dmap_iter.c103 struct bpf_iter_aux_info *aux) in bpf_iter_attach_map() argument
126 key_acc_size = prog->aux->max_rdonly_access; in bpf_iter_attach_map()
127 value_acc_size = prog->aux->max_rdwr_access; in bpf_iter_attach_map()
139 aux->map = map; in bpf_iter_attach_map()
147 static void bpf_iter_detach_map(struct bpf_iter_aux_info *aux) in bpf_iter_detach_map() argument
149 bpf_map_put_with_uref(aux->map); in bpf_iter_detach_map()
152 void bpf_iter_map_show_fdinfo(const struct bpf_iter_aux_info *aux, in bpf_iter_map_show_fdinfo() argument
155 seq_printf(seq, "map_id:\t%u\n", aux->map->id); in bpf_iter_map_show_fdinfo()
158 int bpf_iter_map_fill_link_info(const struct bpf_iter_aux_info *aux, in bpf_iter_map_fill_link_info() argument
161 info->iter.map.map_id = aux->map->id; in bpf_iter_map_fill_link_info()
Doffload.c112 prog->aux->offload = offload; in bpf_prog_offload_init()
133 offload = prog->aux->offload; in bpf_prog_offload_verifier_prep()
150 offload = env->prog->aux->offload; in bpf_prog_offload_verify_insn()
165 offload = env->prog->aux->offload; in bpf_prog_offload_finalize()
186 offload = env->prog->aux->offload; in bpf_prog_offload_replace_insn()
203 offload = env->prog->aux->offload; in bpf_prog_offload_remove_insns()
214 struct bpf_prog_offload *offload = prog->aux->offload; in __bpf_prog_offload_destroy()
221 prog->aux->offload = NULL; in __bpf_prog_offload_destroy()
227 if (prog->aux->offload) in bpf_prog_offload_destroy()
238 offload = prog->aux->offload; in bpf_prog_offload_translate()
[all …]
Dsyscall.c1941 if (!bpf_prog_is_dev_bound(prog->aux)) in find_prog_type()
1942 prog->aux->ops = ops; in find_prog_type()
1944 prog->aux->ops = &bpf_offload_prog_ops; in find_prog_type()
1975 prog->aux->id, bpf_audit_str[op]); in bpf_audit_prog()
1987 prog->aux->id = id; in bpf_prog_alloc_id()
2007 if (!prog->aux->id) in bpf_prog_free_id()
2015 idr_remove(&prog_idr, prog->aux->id); in bpf_prog_free_id()
2016 prog->aux->id = 0; in bpf_prog_free_id()
2026 struct bpf_prog_aux *aux = container_of(rcu, struct bpf_prog_aux, rcu); in __bpf_prog_put_rcu() local
2028 kvfree(aux->func_info); in __bpf_prog_put_rcu()
[all …]
Dbpf_lsm.c77 if (btf_type_vlen(prog->aux->attach_func_proto) < 1 || in BTF_SET_END()
79 prog->aux->attach_btf_id)) { in BTF_SET_END()
85 args = btf_params(prog->aux->attach_func_proto); in BTF_SET_END()
106 if (!btf_id_set_contains(&bpf_lsm_hooks, prog->aux->attach_btf_id)) { in bpf_lsm_verify_prog()
108 prog->aux->attach_btf_id, prog->aux->attach_func_name); in bpf_lsm_verify_prog()
145 return bpf_lsm_is_sleepable_hook(prog->aux->attach_btf_id); in bpf_ima_inode_hash_allowed()
223 return prog->aux->sleepable ? &bpf_ima_inode_hash_proto : NULL; in bpf_lsm_func_proto()
225 return prog->aux->sleepable ? &bpf_ima_file_hash_proto : NULL; in bpf_lsm_func_proto()
233 prog->aux->attach_btf_id)) in bpf_lsm_func_proto()
236 prog->aux->attach_btf_id)) in bpf_lsm_func_proto()
[all …]
Dtask_iter.c228 struct bpf_iter_aux_info *aux) in bpf_iter_attach_task() argument
237 aux->task.type = BPF_TASK_ITER_ALL; in bpf_iter_attach_task()
239 aux->task.type = BPF_TASK_ITER_TID; in bpf_iter_attach_task()
240 aux->task.pid = linfo->task.tid; in bpf_iter_attach_task()
243 aux->task.type = BPF_TASK_ITER_TGID; in bpf_iter_attach_task()
244 aux->task.pid = linfo->task.pid; in bpf_iter_attach_task()
247 aux->task.type = BPF_TASK_ITER_TGID; in bpf_iter_attach_task()
254 aux->task.pid = tgid; in bpf_iter_attach_task()
410 static int init_seq_pidns(void *priv_data, struct bpf_iter_aux_info *aux) in init_seq_pidns() argument
415 common->type = aux->task.type; in init_seq_pidns()
[all …]
Dbpf_iter.c18 struct bpf_iter_aux_info aux; member
247 if (link->aux.map) { in __get_seq_info()
248 seq_info = link->aux.map->ops->iter_seq_info; in __get_seq_info()
336 tinfo->btf_id = prog->aux->attach_btf_id; in cache_btf_id()
341 const char *attach_fname = prog->aux->attach_func_name; in bpf_iter_prog_supported()
343 u32 prog_btf_id = prog->aux->attach_btf_id; in bpf_iter_prog_supported()
365 prog->aux->ctx_arg_info_size = tinfo->reg_info->ctx_arg_info_size; in bpf_iter_prog_supported()
366 prog->aux->ctx_arg_info = tinfo->reg_info->ctx_arg_info; in bpf_iter_prog_supported()
380 if (tinfo->btf_id == prog->aux->attach_btf_id) { in bpf_iter_get_func_proto()
400 iter_link->tinfo->reg_info->detach_target(&iter_link->aux); in bpf_iter_link_release()
[all …]
Dverifier.c194 static bool bpf_map_ptr_poisoned(const struct bpf_insn_aux_data *aux) in bpf_map_ptr_poisoned() argument
196 return BPF_MAP_PTR(aux->map_ptr_state) == BPF_MAP_PTR_POISON; in bpf_map_ptr_poisoned()
199 static bool bpf_map_ptr_unpriv(const struct bpf_insn_aux_data *aux) in bpf_map_ptr_unpriv() argument
201 return aux->map_ptr_state & BPF_MAP_PTR_UNPRIV; in bpf_map_ptr_unpriv()
204 static void bpf_map_ptr_store(struct bpf_insn_aux_data *aux, in bpf_map_ptr_store() argument
208 unpriv |= bpf_map_ptr_unpriv(aux); in bpf_map_ptr_store()
209 aux->map_ptr_state = (unsigned long)map | in bpf_map_ptr_store()
213 static bool bpf_map_key_poisoned(const struct bpf_insn_aux_data *aux) in bpf_map_key_poisoned() argument
215 return aux->map_key_state & BPF_MAP_KEY_POISON; in bpf_map_key_poisoned()
218 static bool bpf_map_key_unseen(const struct bpf_insn_aux_data *aux) in bpf_map_key_unseen() argument
[all …]
Dtrampoline.c533 if (!prog->aux->attach_func_proto->type) in bpf_attach_type_to_tramp()
678 p->aux->cgroup_atype = cgroup_atype; in cgroup_shim_alloc()
679 p->aux->attach_func_proto = prog->aux->attach_func_proto; in cgroup_shim_alloc()
680 p->aux->attach_btf_id = prog->aux->attach_btf_id; in cgroup_shim_alloc()
681 p->aux->attach_btf = prog->aux->attach_btf; in cgroup_shim_alloc()
682 btf_get(p->aux->attach_btf); in cgroup_shim_alloc()
688 bpf_cgroup_atype_get(p->aux->attach_btf_id, cgroup_atype); in cgroup_shim_alloc()
722 prog->aux->attach_btf_id, in bpf_trampoline_link_cgroup_shim()
727 key = bpf_trampoline_compute_key(NULL, prog->aux->attach_btf, in bpf_trampoline_link_cgroup_shim()
728 prog->aux->attach_btf_id); in bpf_trampoline_link_cgroup_shim()
[all …]
Dlocal_storage.c463 int bpf_cgroup_storage_assign(struct bpf_prog_aux *aux, struct bpf_map *_map) in bpf_cgroup_storage_assign() argument
467 if (aux->cgroup_storage[stype] && in bpf_cgroup_storage_assign()
468 aux->cgroup_storage[stype] != _map) in bpf_cgroup_storage_assign()
471 aux->cgroup_storage[stype] = _map; in bpf_cgroup_storage_assign()
501 map = prog->aux->cgroup_storage[stype]; in bpf_cgroup_storage_alloc()
Dbtf.c5336 struct bpf_prog *tgt_prog = prog->aux->dst_prog; in bpf_prog_get_target_btf()
5339 return tgt_prog->aux->btf; in bpf_prog_get_target_btf()
5341 return prog->aux->attach_btf; in bpf_prog_get_target_btf()
5384 const struct btf_type *t = prog->aux->attach_func_proto; in btf_ctx_access()
5385 struct bpf_prog *tgt_prog = prog->aux->dst_prog; in btf_ctx_access()
5387 const char *tname = prog->aux->attach_func_name; in btf_ctx_access()
5405 if (prog->aux->attach_btf_trace) { in btf_ctx_access()
5482 for (i = 0; i < prog->aux->ctx_arg_info_size; i++) { in btf_ctx_access()
5483 const struct bpf_ctx_arg_aux *ctx_arg_info = &prog->aux->ctx_arg_info[i]; in btf_ctx_access()
5506 for (i = 0; i < prog->aux->ctx_arg_info_size; i++) { in btf_ctx_access()
[all …]
Dcgroup.c83 shim_prog->aux->cgroup_atype, in __cgroup_bpf_run_lsm_sock()
105 shim_prog->aux->cgroup_atype, in __cgroup_bpf_run_lsm_socket()
124 shim_prog->aux->cgroup_atype, in __cgroup_bpf_run_lsm_current()
220 map = prog->aux->cgroup_storage[stype]; in bpf_cgroup_storages_alloc()
633 atype = bpf_cgroup_atype_find(type, new_prog->aux->attach_btf_id); in __cgroup_bpf_attach()
802 atype = bpf_cgroup_atype_find(link->type, new_prog->aux->attach_btf_id); in __cgroup_bpf_replace()
960 attach_btf_id = prog->aux->attach_btf_id; in __cgroup_bpf_detach()
962 attach_btf_id = link->link.prog->aux->attach_btf_id; in __cgroup_bpf_detach()
1094 id = prog->aux->id; in __cgroup_bpf_query()
Dbpf_struct_ops.c464 prog->aux->attach_btf_id != st_ops->type_id || in bpf_struct_ops_map_update_elem()
491 *(unsigned long *)(udata + moff) = prog->aux->id; in bpf_struct_ops_map_update_elem()
Dhelpers.c1216 struct bpf_prog_aux *, aux) in BPF_CALL_3() argument
1218 struct bpf_prog *prev, *prog = aux->prog; in BPF_CALL_3()
Dcpumap.c424 rcpu->value.bpf_prog.id = prog->aux->id; in __cpu_map_load_bpf_program()
/kernel/bpf/preload/iterators/
Diterators.bpf.c50 struct bpf_prog_aux *aux; member
99 struct bpf_prog_aux *aux; in dump_bpf_prog() local
104 aux = prog->aux; in dump_bpf_prog()
108 BPF_SEQ_PRINTF(seq, "%4u %-16s %s %s\n", aux->id, in dump_bpf_prog()
109 get_name(aux->btf, aux->func_info[0].type_id, aux->name), in dump_bpf_prog()
110 aux->attach_func_name, aux->dst_prog->aux->name); in dump_bpf_prog()
/kernel/futex/
Dsyscalls.c203 struct futex_waitv aux; in futex_parse_waitv() local
207 if (copy_from_user(&aux, &uwaitv[i], sizeof(aux))) in futex_parse_waitv()
210 if ((aux.flags & ~FUTEXV_WAITER_MASK) || aux.__reserved) in futex_parse_waitv()
213 if (!(aux.flags & FUTEX_32)) in futex_parse_waitv()
216 futexv[i].w.flags = aux.flags; in futex_parse_waitv()
217 futexv[i].w.val = aux.val; in futex_parse_waitv()
218 futexv[i].w.uaddr = aux.uaddr; in futex_parse_waitv()
/kernel/
Dauditsc.c940 struct audit_aux_data *aux; in audit_free_aux() local
942 while ((aux = context->aux)) { in audit_free_aux()
943 context->aux = aux->next; in audit_free_aux()
944 kfree(aux); in audit_free_aux()
946 context->aux = NULL; in audit_free_aux()
947 while ((aux = context->aux_pids)) { in audit_free_aux()
948 context->aux_pids = aux->next; in audit_free_aux()
949 kfree(aux); in audit_free_aux()
1679 struct audit_aux_data *aux; in audit_log_exit() local
1717 for (aux = context->aux; aux; aux = aux->next) { in audit_log_exit()
[all …]
Daudit.h131 struct audit_aux_data *aux; member
Dkallsyms.c914 static int bpf_iter_ksym_init(void *priv_data, struct bpf_iter_aux_info *aux) in bpf_iter_ksym_init() argument
/kernel/power/
Dwakelock.c102 struct wakelock *wl, *aux; in __wakelocks_gc() local
108 list_for_each_entry_safe_reverse(wl, aux, &wakelocks_lru_list, lru) { in __wakelocks_gc()
Dsnapshot.c611 struct mem_extent *ext, *aux; in free_mem_extents() local
613 list_for_each_entry_safe(ext, aux, list, hook) { in free_mem_extents()
634 struct mem_extent *ext, *cur, *aux; in create_mem_extents() local
666 list_for_each_entry_safe_continue(cur, aux, list, hook) { in create_mem_extents()
/kernel/trace/
Dbpf_trace.c961 return bpf_lsm_is_sleepable_hook(prog->aux->attach_btf_id); in BTF_ID()
964 prog->aux->attach_btf_id); in BTF_ID()
1502 return prog->aux->sleepable ? &bpf_copy_from_user_proto : NULL; in bpf_tracing_func_proto()
1504 return prog->aux->sleepable ? &bpf_copy_from_user_task_proto : NULL; in bpf_tracing_func_proto()
2332 if (prog->aux->max_ctx_offset > btp->num_args * sizeof(u64)) in __bpf_probe_register()
2335 if (prog->aux->max_tp_access > btp->writable_size) in __bpf_probe_register()
2368 *prog_id = prog->aux->id; in bpf_get_perf_event_info()

12