Lines Matching refs:off

65 #define OFF	insn->off
200 * jited_off is the byte off to the end of the jited insn.
204 * The first bpf insn off of the prog. The insn off
325 dst[i].off == 0) {
383 s64 off_min, off_max, off;
387 off = insn->imm;
391 off = insn->off;
396 if (curr < pos && curr + off + 1 >= end_old)
397 off += delta;
398 else if (curr >= end_new && curr + off + 1 < end_new)
399 off -= delta;
400 if (off < off_min || off > off_max)
404 insn->imm = off;
406 insn->off = off;
458 static void bpf_adj_linfo(struct bpf_prog *prog, u32 off, u32 delta)
470 if (off < linfo[i].insn_off)
473 /* Push all off < linfo[i].insn_off by delta */
478 struct bpf_prog *bpf_patch_insn_single(struct bpf_prog *prog, u32 off,
488 memcpy(prog->insnsi + off, patch, sizeof(*patch));
494 /* Reject anything that would potentially let the insn->off
500 (err = bpf_adj_branches(prog, off, off + 1, off + len, true)))
522 insn_rest = insn_adj_cnt - off - len;
524 memmove(prog_adj->insnsi + off + len, prog_adj->insnsi + off + 1,
526 memcpy(prog_adj->insnsi + off, patch, sizeof(*patch) * len);
532 BUG_ON(bpf_adj_branches(prog_adj, off, off + 1, off + len, false));
534 bpf_adj_linfo(prog_adj, off, insn_delta);
539 int bpf_remove_insns(struct bpf_prog *prog, u32 off, u32 cnt)
544 memmove(prog->insnsi + off, prog->insnsi + off + cnt,
545 sizeof(struct bpf_insn) * (prog->len - off - cnt));
548 return WARN_ON_ONCE(bpf_adj_branches(prog, off, off + cnt, off, false));
740 unsigned long *off, char *sym)
756 if (off)
757 *off = addr - symbol_start;
1254 s16 off = insn->off;
1268 off >= 0 && off < prog->aux->real_func_cnt)
1269 addr = (u8 *)prog->aux->func[off]->bpf_func;
1274 err = bpf_get_kfunc_addr(prog, insn->imm, insn->off, &addr);
1297 s16 off;
1341 *to++ = BPF_ALU32_REG_OFF(from->code, from->dst_reg, BPF_REG_AX, from->off);
1355 *to++ = BPF_ALU64_REG_OFF(from->code, from->dst_reg, BPF_REG_AX, from->off);
1370 off = from->off;
1371 if (off < 0)
1372 off -= 2;
1375 *to++ = BPF_JMP_REG(from->code, from->dst_reg, BPF_REG_AX, off);
1390 off = from->off;
1391 if (off < 0)
1392 off -= 2;
1396 off);
1419 *to++ = BPF_STX_MEM(from->code, from->dst_reg, BPF_REG_AX, from->off);
2020 insn + insn->off + 1);
2052 insn += insn->off;
2063 insn += insn->off; \
2069 insn += insn->off; \
2075 insn += insn->off; \
2081 insn += insn->off; \
2112 *(SIZE *)(unsigned long) (DST + insn->off) = SRC; \
2115 *(SIZE *)(unsigned long) (DST + insn->off) = IMM; \
2118 DST = *(SIZE *)(unsigned long) (SRC + insn->off); \
2122 (const void *)(long) (SRC + insn->off)); \
2134 DST = *(SIZE *)(unsigned long) (SRC + insn->off); \
2138 (const void *)(long) (SRC + insn->off)); \
2151 (DST + insn->off)); \
2154 (DST + insn->off)); \
2160 (atomic_t *)(unsigned long) (DST + insn->off)); \
2164 (atomic64_t *)(unsigned long) (DST + insn->off)); \
2179 (atomic_t *)(unsigned long) (DST + insn->off),
2183 (atomic64_t *)(unsigned long) (DST + insn->off),
2189 (atomic_t *)(unsigned long) (DST + insn->off),
2193 (atomic64_t *)(unsigned long) (DST + insn->off),
2284 insn->off = (s16) insn->imm;