• Home
  • Raw
  • Download

Lines Matching refs:aux

179 static bool bpf_map_ptr_poisoned(const struct bpf_insn_aux_data *aux)  in bpf_map_ptr_poisoned()  argument
181 return BPF_MAP_PTR(aux->map_state) == BPF_MAP_PTR_POISON; in bpf_map_ptr_poisoned()
184 static bool bpf_map_ptr_unpriv(const struct bpf_insn_aux_data *aux) in bpf_map_ptr_unpriv() argument
186 return aux->map_state & BPF_MAP_PTR_UNPRIV; in bpf_map_ptr_unpriv()
189 static void bpf_map_ptr_store(struct bpf_insn_aux_data *aux, in bpf_map_ptr_store() argument
193 unpriv |= bpf_map_ptr_unpriv(aux); in bpf_map_ptr_store()
194 aux->map_state = (unsigned long)map | in bpf_map_ptr_store()
220 nr_linfo = prog->aux->nr_linfo; in find_linfo()
225 linfo = prog->aux->linfo; in find_linfo()
313 ltrim(btf_name_by_offset(env->prog->aux->btf, in verbose_linfo()
2337 env->prog->aux->max_pkt_offset = in check_packet_access()
2338 max_t(u32, env->prog->aux->max_pkt_offset, in check_packet_access()
2365 if (env->prog->aux->max_ctx_offset < off + size) in check_ctx_access()
2366 env->prog->aux->max_ctx_offset = off + size; in check_ctx_access()
2724 if (off + size > env->prog->aux->max_tp_access) in check_tp_buffer_access()
2725 env->prog->aux->max_tp_access = off + size; in check_tp_buffer_access()
3901 struct bpf_insn_aux_data *aux = &env->insn_aux_data[insn_idx]; in record_func_map() local
3931 if (!BPF_MAP_PTR(aux->map_state)) in record_func_map()
3932 bpf_map_ptr_store(aux, meta->map_ptr, in record_func_map()
3934 else if (BPF_MAP_PTR(aux->map_state) != meta->map_ptr) in record_func_map()
3935 bpf_map_ptr_store(aux, BPF_MAP_PTR_POISON, in record_func_map()
4252 static int update_alu_sanitation_state(struct bpf_insn_aux_data *aux, in update_alu_sanitation_state() argument
4258 if (aux->alu_state && in update_alu_sanitation_state()
4259 (aux->alu_state != alu_state || in update_alu_sanitation_state()
4260 aux->alu_limit != alu_limit)) in update_alu_sanitation_state()
4264 aux->alu_state = alu_state; in update_alu_sanitation_state()
4265 aux->alu_limit = alu_limit; in update_alu_sanitation_state()
4272 struct bpf_insn_aux_data *aux = cur_aux(env); in sanitize_val_alu() local
4277 return update_alu_sanitation_state(aux, BPF_ALU_NON_POINTER, 0); in sanitize_val_alu()
4287 struct bpf_insn_aux_data *aux = cur_aux(env); in sanitize_ptr_alu() local
4310 if (update_alu_sanitation_state(aux, alu_state, alu_limit)) in sanitize_ptr_alu()
5974 struct bpf_insn_aux_data *aux = cur_aux(env); in check_ld_imm() local
6000 map = env->used_maps[aux->map_index]; in check_ld_imm()
6006 regs[insn->dst_reg].off = aux->map_off; in check_ld_imm()
6466 btf = prog->aux->btf; in check_btf_func()
6530 prog->aux->func_info = krecord; in check_btf_func()
6531 prog->aux->func_info_cnt = nfuncs; in check_btf_func()
6543 if (!env->prog->aux->func_info) in adjust_btf_func()
6547 env->prog->aux->func_info[i].insn_off = env->subprog_info[i].start; in adjust_btf_func()
6585 btf = prog->aux->btf; in check_btf_line()
6666 prog->aux->linfo = linfo; in check_btf_line()
6667 prog->aux->nr_linfo = nr_linfo; in check_btf_line()
6689 env->prog->aux->btf = btf; in check_btf_info()
7596 if (bpf_prog_is_dev_bound(env->prog->aux)) { in do_check()
7852 env->prog->aux->stack_depth = env->subprog_info[0].stack_depth; in do_check()
7906 if ((bpf_prog_is_dev_bound(prog->aux) || bpf_map_is_dev_bound(map)) && in check_map_prog_compatibility()
7949 struct bpf_insn_aux_data *aux; in replace_map_fd_with_map_ptr() local
7991 aux = &env->insn_aux_data[i]; in replace_map_fd_with_map_ptr()
8017 aux->map_off = off; in replace_map_fd_with_map_ptr()
8027 aux->map_index = j; in replace_map_fd_with_map_ptr()
8049 aux->map_index = env->used_map_cnt; in replace_map_fd_with_map_ptr()
8087 if (!env->prog->aux->cgroup_storage[stype]) in release_maps()
8090 env->prog->aux->cgroup_storage[stype]); in release_maps()
8199 struct bpf_prog_aux *aux = env->prog->aux; in adjust_subprog_starts_after_remove() local
8211 if (aux->func_info) { in adjust_subprog_starts_after_remove()
8212 move = aux->func_info_cnt - j; in adjust_subprog_starts_after_remove()
8214 memmove(aux->func_info + i, in adjust_subprog_starts_after_remove()
8215 aux->func_info + j, in adjust_subprog_starts_after_remove()
8216 sizeof(*aux->func_info) * move); in adjust_subprog_starts_after_remove()
8217 aux->func_info_cnt -= j - i; in adjust_subprog_starts_after_remove()
8242 nr_linfo = prog->aux->nr_linfo; in bpf_adj_linfo_after_remove()
8246 linfo = prog->aux->linfo; in bpf_adj_linfo_after_remove()
8276 prog->aux->nr_linfo -= l_cnt; in bpf_adj_linfo_after_remove()
8277 nr_linfo = prog->aux->nr_linfo; in bpf_adj_linfo_after_remove()
8305 if (bpf_prog_is_dev_bound(env->prog->aux)) in verifier_remove_insns()
8385 if (bpf_prog_is_dev_bound(env->prog->aux)) in opt_hard_wire_dead_code_branches()
8441 struct bpf_insn_aux_data *aux = env->insn_aux_data; in opt_subreg_zext_lo32_rnd_hi32() local
8457 if (!aux[adj_idx].zext_dst) { in opt_subreg_zext_lo32_rnd_hi32()
8482 aux[adj_idx].ptr_type == PTR_TO_CTX) in opt_subreg_zext_lo32_rnd_hi32()
8508 aux = env->insn_aux_data; in opt_subreg_zext_lo32_rnd_hi32()
8551 if (bpf_prog_is_dev_bound(env->prog->aux)) in convert_ctx_accesses()
8758 func[i]->aux->func_idx = i; in jit_subprogs()
8760 func[i]->aux->btf = prog->aux->btf; in jit_subprogs()
8761 func[i]->aux->func_info = prog->aux->func_info; in jit_subprogs()
8766 func[i]->aux->name[0] = 'F'; in jit_subprogs()
8767 func[i]->aux->stack_depth = env->subprog_info[i].stack_depth; in jit_subprogs()
8769 func[i]->aux->linfo = prog->aux->linfo; in jit_subprogs()
8770 func[i]->aux->nr_linfo = prog->aux->nr_linfo; in jit_subprogs()
8771 func[i]->aux->jited_linfo = prog->aux->jited_linfo; in jit_subprogs()
8772 func[i]->aux->linfo_idx = env->subprog_info[i].linfo_idx; in jit_subprogs()
8806 func[i]->aux->func = func; in jit_subprogs()
8807 func[i]->aux->func_cnt = env->subprog_cnt; in jit_subprogs()
8843 prog->aux->func = func; in jit_subprogs()
8844 prog->aux->func_cnt = env->subprog_cnt; in jit_subprogs()
8876 !bpf_prog_is_dev_bound(env->prog->aux)) { in fixup_call_args()
8910 struct bpf_insn_aux_data *aux; in fixup_bpf_calls() local
8985 aux = &env->insn_aux_data[i + delta]; in fixup_bpf_calls()
8986 if (!aux->alu_state || in fixup_bpf_calls()
8987 aux->alu_state == BPF_ALU_NON_POINTER) in fixup_bpf_calls()
8990 isneg = aux->alu_state & BPF_ALU_NEG_VALUE; in fixup_bpf_calls()
8991 issrc = (aux->alu_state & BPF_ALU_SANITIZE) == in fixup_bpf_calls()
8997 *patch++ = BPF_MOV32_IMM(BPF_REG_AX, aux->alu_limit - 1); in fixup_bpf_calls()
9046 env->prog->aux->stack_depth = MAX_BPF_STACK; in fixup_bpf_calls()
9047 env->prog->aux->max_pkt_offset = MAX_PACKET_OFF; in fixup_bpf_calls()
9057 aux = &env->insn_aux_data[i + delta]; in fixup_bpf_calls()
9058 if (!bpf_map_ptr_unpriv(aux)) in fixup_bpf_calls()
9067 if (bpf_map_ptr_poisoned(aux)) { in fixup_bpf_calls()
9072 map_ptr = BPF_MAP_PTR(aux->map_state); in fixup_bpf_calls()
9102 aux = &env->insn_aux_data[i + delta]; in fixup_bpf_calls()
9103 if (bpf_map_ptr_poisoned(aux)) in fixup_bpf_calls()
9106 map_ptr = BPF_MAP_PTR(aux->map_state); in fixup_bpf_calls()
9310 if (bpf_prog_is_dev_bound(env->prog->aux)) { in bpf_check()
9341 if (ret == 0 && bpf_prog_is_dev_bound(env->prog->aux)) in bpf_check()
9374 if (ret == 0 && !bpf_prog_is_dev_bound(env->prog->aux)) { in bpf_check()
9376 env->prog->aux->verifier_zext = bpf_jit_needs_zext() ? !ret in bpf_check()
9395 env->prog->aux->used_maps = kmalloc_array(env->used_map_cnt, in bpf_check()
9399 if (!env->prog->aux->used_maps) { in bpf_check()
9404 memcpy(env->prog->aux->used_maps, env->used_maps, in bpf_check()
9406 env->prog->aux->used_map_cnt = env->used_map_cnt; in bpf_check()
9418 if (!env->prog->aux->used_maps) in bpf_check()