Lines Matching defs:imm
3827 insns[0].imm = map;
5424 insn->imm = 195896080; /* => 0xbad2310 => "bad relo" */
5459 * Expected insn->imm value is determined using relocation kind and local
5460 * spec, and is checked before patching instruction. If actual insn->imm value
5464 * 1. rX = <imm> (assignment with immediate operand);
5465 * 2. rX += <imm> (arithmetic operations with immediate operand);
5469 * 6. *(T *)(rX + <off>) = <imm>, where T is one of {u8, u16, u32, u64}.
5511 if (res->validate && insn->imm != orig_val) {
5514 insn_idx, insn->imm, orig_val, new_val);
5517 orig_val = insn->imm;
5518 insn->imm = new_val;
5519 pr_debug("prog '%s': relo #%d: patched insn #%d (ALU/ALU64) imm %u -> %u\n",
5571 __u64 imm;
5583 imm = insn[0].imm + ((__u64)insn[1].imm << 32);
5584 if (res->validate && imm != orig_val) {
5587 insn_idx, (unsigned long long)imm,
5592 insn[0].imm = new_val;
5593 insn[1].imm = 0; /* currently only 32-bit values are supported */
5596 (unsigned long long)imm, new_val);
5600 pr_warn("prog '%s': relo #%d: trying to relocate unrecognized insn #%d, code:0x%x, src:0x%x, dst:0x%x, off:0x%x, imm:0x%x\n",
5602 insn->src_reg, insn->dst_reg, insn->off, insn->imm);
6016 insn[0].imm = obj->maps[relo->map_idx].fd;
6021 insn[1].imm = insn[0].imm + relo->sym_off;
6022 insn[0].imm = obj->maps[relo->map_idx].fd;
6029 insn[0].imm = obj->maps[obj->kconfig_map_idx].fd;
6030 insn[1].imm = ext->kcfg.data_off;
6034 insn[0].imm = ext->ksym.vmlinux_btf_id;
6036 insn[0].imm = (__u32)ext->ksym.addr;
6037 insn[1].imm = ext->ksym.addr >> 32;
6240 * call instruction's imm field; for global functions,
6241 * call always has imm = -1, but for static functions
6242 * relocation is against STT_SECTION and insn->imm
6245 sub_insn_idx = relo->sym_off / BPF_INSN_SZ + insn->imm + 1;
6250 * offset necessary, insns->imm is relative to
6253 sub_insn_idx = prog->sec_insn_off + insn_idx + insn->imm + 1;
6306 insn->imm = subprog->sub_insn_off - (prog->sub_insn_off + insn_idx) - 1;
6311 pr_debug("prog '%s': insn #%zu relocated, imm %d points to subprog '%s' (now at %zu offset)\n",
6312 prog->name, insn_idx, insn->imm, subprog->name, subprog->sub_insn_off);
6657 *func_id = insn->imm;
6681 insn->imm = BPF_FUNC_probe_read;
6686 insn->imm = BPF_FUNC_probe_read_str;