• Home
  • Raw
  • Download

Lines Matching refs:imm

542 	       insn->imm == BPF_CMPXCHG;  in is_cmpxchg_insn()
1345 static void ___mark_reg_known(struct bpf_reg_state *reg, u64 imm) in ___mark_reg_known() argument
1347 reg->var_off = tnum_const(imm); in ___mark_reg_known()
1348 reg->smin_value = (s64)imm; in ___mark_reg_known()
1349 reg->smax_value = (s64)imm; in ___mark_reg_known()
1350 reg->umin_value = imm; in ___mark_reg_known()
1351 reg->umax_value = imm; in ___mark_reg_known()
1353 reg->s32_min_value = (s32)imm; in ___mark_reg_known()
1354 reg->s32_max_value = (s32)imm; in ___mark_reg_known()
1355 reg->u32_min_value = (u32)imm; in ___mark_reg_known()
1356 reg->u32_max_value = (u32)imm; in ___mark_reg_known()
1362 static void __mark_reg_known(struct bpf_reg_state *reg, u64 imm) in __mark_reg_known() argument
1367 ___mark_reg_known(reg, imm); in __mark_reg_known()
1370 static void __mark_reg32_known(struct bpf_reg_state *reg, u64 imm) in __mark_reg32_known() argument
1372 reg->var_off = tnum_const_subreg(reg->var_off, imm); in __mark_reg32_known()
1373 reg->s32_min_value = (s32)imm; in __mark_reg32_known()
1374 reg->s32_max_value = (s32)imm; in __mark_reg32_known()
1375 reg->u32_min_value = (u32)imm; in __mark_reg32_known()
1376 reg->u32_max_value = (u32)imm; in __mark_reg32_known()
1893 s32 imm; member
2134 desc->imm = call_imm; in add_kfunc_call()
2150 if (d0->imm > d1->imm) in kfunc_desc_cmp_by_imm()
2152 else if (d0->imm < d1->imm) in kfunc_desc_cmp_by_imm()
2179 .imm = insn->imm, in bpf_jit_find_kfunc_model()
2213 ret = add_subprog(env, i + insn->imm + 1); in add_subprog_and_kfunc()
2215 ret = add_kfunc_call(env, insn->imm, insn->off); in add_subprog_and_kfunc()
2247 insn[i].imm == BPF_FUNC_tail_call && in check_subprogs()
2371 (class == BPF_ALU && op == BPF_END && insn->imm == 64)) in is_reg64()
2431 (insn->imm & BPF_FETCH)) { in insn_def_regno()
2432 if (insn->imm == BPF_CMPXCHG) in insn_def_regno()
2581 func = btf_type_by_id(desc_btf, insn->imm); in disasm_kfunc_name()
2703 if (insn->src_reg == BPF_PSEUDO_KFUNC_CALL && insn->imm == 0) in backtrack_insn()
2708 if (insn->src_reg == 0 && is_callback_calling_function(insn->imm)) in backtrack_insn()
3314 insn->imm != 0 && env->bpf_capable) { in check_stack_write_fixed_off()
3317 __mark_reg_known(&fake_reg, insn->imm); in check_stack_write_fixed_off()
3355 (!reg && is_bpf_st_mem(insn) && insn->imm == 0)) { in check_stack_write_fixed_off()
4040 if (insn->imm) { in check_map_kptr_access()
4528 next_insn = i + insn[i].imm + 1; in check_max_stack_depth_subprog()
4601 int start = idx + insn->imm + 1, subprog; in get_callee_stack_depth()
5218 switch (insn->imm) { in check_atomic()
5231 verbose(env, "BPF_ATOMIC uses invalid atomic opcode %02x\n", insn->imm); in check_atomic()
5250 if (insn->imm == BPF_CMPXCHG) { in check_atomic()
5279 if (insn->imm & BPF_FETCH) { in check_atomic()
5280 if (insn->imm == BPF_CMPXCHG) in check_atomic()
6966 if (set_callee_state_cb != set_callee_state && !is_callback_calling_function(insn->imm)) { in __check_func_call()
6968 func_id_name(insn->imm), insn->imm); in __check_func_call()
6974 insn->imm == BPF_FUNC_timer_set_callback) { in __check_func_call()
7090 target_insn = *insn_idx + insn->imm + 1; in check_func_call()
7536 func_id = insn->imm; in check_helper_call()
7961 if (!insn->imm) in check_kfunc_call()
7968 func_id = insn->imm; in check_kfunc_call()
9505 __mark_reg_known(&off_reg, insn->imm); in adjust_reg_min_max_vals()
9537 insn->off != 0 || insn->imm != 0) { in check_alu_op()
9543 (insn->imm != 16 && insn->imm != 32 && insn->imm != 64) || in check_alu_op()
9569 if (insn->imm != 0 || insn->off != 0) { in check_alu_op()
9639 insn->imm); in check_alu_op()
9642 (u32)insn->imm); in check_alu_op()
9653 if (insn->imm != 0 || insn->off != 0) { in check_alu_op()
9674 BPF_SRC(insn->code) == BPF_K && insn->imm == 0) { in check_alu_op()
9683 if (insn->imm < 0 || insn->imm >= size) { in check_alu_op()
9684 verbose(env, "invalid shift %d\n", insn->imm); in check_alu_op()
10440 if (insn->imm != 0) { in check_cond_jmp_op()
10467 pred = is_branch_taken(dst_reg, insn->imm, opcode, is_jmp32); in check_cond_jmp_op()
10576 dst_reg, insn->imm, (u32)insn->imm, in check_cond_jmp_op()
10591 insn->imm == 0 && (opcode == BPF_JEQ || opcode == BPF_JNE) && in check_cond_jmp_op()
10636 u64 imm = ((u64)(insn + 1)->imm << 32) | (u32)insn->imm; in check_ld_imm() local
10639 __mark_reg_known(&regs[insn->dst_reg], imm); in check_ld_imm()
10669 env->insn_idx + insn->imm + 1); in check_ld_imm()
11103 ret = push_insn(t, t + insns[t].imm + 1, BRANCH, env, in visit_func_call_insn()
11136 if (insns[t].imm == BPF_FUNC_timer_set_callback) in visit_insn()
12610 if (BPF_MODE(insn->code) != BPF_MEM || insn->imm != 0) { in do_check()
12686 insn->imm != BPF_FUNC_spin_unlock)) { in do_check()
12700 insn->imm != 0 || in do_check()
12713 insn->imm != 0 || in do_check()
12837 u32 type, id = insn->imm; in check_pseudo_btf_id()
12843 btf_fd = insn[1].imm; in check_pseudo_btf_id()
12892 insn[0].imm = (u32)addr; in check_pseudo_btf_id()
12893 insn[1].imm = addr >> 32; in check_pseudo_btf_id()
13063 (BPF_MODE(insn->code) != BPF_MEM || insn->imm != 0)) { in resolve_pseudo_ldimm64()
13109 if (insn[1].imm == 0) in resolve_pseudo_ldimm64()
13125 insn[0].imm * sizeof(fd), in resolve_pseudo_ldimm64()
13130 fd = insn[0].imm; in resolve_pseudo_ldimm64()
13138 insn[0].imm); in resolve_pseudo_ldimm64()
13153 u32 off = insn[1].imm; in resolve_pseudo_ldimm64()
13179 insn[0].imm = (u32)addr; in resolve_pseudo_ldimm64()
13180 insn[1].imm = addr >> 32; in resolve_pseudo_ldimm64()
13667 rnd_hi32_patch[1].imm = imm_rnd; in opt_subreg_zext_lo32_rnd_hi32()
13924 subprog = find_subprog(env, i + insn->imm + 1); in jit_subprogs()
13927 i + insn->imm + 1); in jit_subprogs()
13937 env->insn_aux_data[i].call_imm = insn->imm; in jit_subprogs()
13939 insn->imm = 1; in jit_subprogs()
13945 insn[1].imm = 1; in jit_subprogs()
14030 insn[0].imm = (u32)(long)func[subprog]->bpf_func; in jit_subprogs()
14031 insn[1].imm = ((u64)(long)func[subprog]->bpf_func) >> 32; in jit_subprogs()
14037 insn->imm = BPF_CALL_IMM(func[subprog]->bpf_func); in jit_subprogs()
14080 insn[0].imm = env->insn_aux_data[i].call_imm; in jit_subprogs()
14081 insn[1].imm = insn->off; in jit_subprogs()
14089 insn->imm = subprog; in jit_subprogs()
14129 insn->imm = env->insn_aux_data[i].call_imm; in jit_subprogs()
14191 if (!insn->imm) { in fixup_kfunc_call()
14199 desc = find_kfunc_desc(env->prog, insn->imm, insn->off); in fixup_kfunc_call()
14202 insn->imm); in fixup_kfunc_call()
14206 insn->imm = desc->imm; in fixup_kfunc_call()
14355 if (insn->imm == BPF_FUNC_get_route_realm) in do_misc_fixups()
14357 if (insn->imm == BPF_FUNC_get_prandom_u32) in do_misc_fixups()
14359 if (insn->imm == BPF_FUNC_override_return) in do_misc_fixups()
14361 if (insn->imm == BPF_FUNC_tail_call) { in do_misc_fixups()
14377 insn->imm = 0; in do_misc_fixups()
14399 insn->imm = ret + 1; in do_misc_fixups()
14436 if (insn->imm == BPF_FUNC_timer_set_callback) { in do_misc_fixups()
14469 if (insn->imm == BPF_FUNC_task_storage_get || in do_misc_fixups()
14470 insn->imm == BPF_FUNC_sk_storage_get || in do_misc_fixups()
14471 insn->imm == BPF_FUNC_inode_storage_get) { in do_misc_fixups()
14494 (insn->imm == BPF_FUNC_map_lookup_elem || in do_misc_fixups()
14495 insn->imm == BPF_FUNC_map_update_elem || in do_misc_fixups()
14496 insn->imm == BPF_FUNC_map_delete_elem || in do_misc_fixups()
14497 insn->imm == BPF_FUNC_map_push_elem || in do_misc_fixups()
14498 insn->imm == BPF_FUNC_map_pop_elem || in do_misc_fixups()
14499 insn->imm == BPF_FUNC_map_peek_elem || in do_misc_fixups()
14500 insn->imm == BPF_FUNC_redirect_map || in do_misc_fixups()
14501 insn->imm == BPF_FUNC_for_each_map_elem || in do_misc_fixups()
14502 insn->imm == BPF_FUNC_map_lookup_percpu_elem)) { in do_misc_fixups()
14509 if (insn->imm == BPF_FUNC_map_lookup_elem && in do_misc_fixups()
14555 switch (insn->imm) { in do_misc_fixups()
14557 insn->imm = BPF_CALL_IMM(ops->map_lookup_elem); in do_misc_fixups()
14560 insn->imm = BPF_CALL_IMM(ops->map_update_elem); in do_misc_fixups()
14563 insn->imm = BPF_CALL_IMM(ops->map_delete_elem); in do_misc_fixups()
14566 insn->imm = BPF_CALL_IMM(ops->map_push_elem); in do_misc_fixups()
14569 insn->imm = BPF_CALL_IMM(ops->map_pop_elem); in do_misc_fixups()
14572 insn->imm = BPF_CALL_IMM(ops->map_peek_elem); in do_misc_fixups()
14575 insn->imm = BPF_CALL_IMM(ops->map_redirect); in do_misc_fixups()
14578 insn->imm = BPF_CALL_IMM(ops->map_for_each_callback); in do_misc_fixups()
14581 insn->imm = BPF_CALL_IMM(ops->map_lookup_percpu_elem); in do_misc_fixups()
14590 insn->imm == BPF_FUNC_jiffies64) { in do_misc_fixups()
14615 insn->imm == BPF_FUNC_get_func_arg) { in do_misc_fixups()
14640 insn->imm == BPF_FUNC_get_func_ret) { in do_misc_fixups()
14668 insn->imm == BPF_FUNC_get_func_arg_cnt) { in do_misc_fixups()
14683 insn->imm == BPF_FUNC_get_func_ip) { in do_misc_fixups()
14697 fn = env->ops->get_func_proto(insn->imm, env->prog); in do_misc_fixups()
14704 func_id_name(insn->imm), insn->imm); in do_misc_fixups()
14707 insn->imm = fn->func - __bpf_call_base; in do_misc_fixups()
14802 new_prog->insnsi[call_insn_offset].imm = callback_offset; in inline_bpf_loop()
14811 insn->imm == BPF_FUNC_loop; in is_bpf_loop_call()