Lines Matching refs:insn_buf
13724 struct bpf_insn insn_buf[16], *insn; in convert_ctx_accesses() local
13735 cnt = ops->gen_prologue(insn_buf, env->seen_direct_write, in convert_ctx_accesses()
13737 if (cnt >= ARRAY_SIZE(insn_buf)) { in convert_ctx_accesses()
13741 new_prog = bpf_patch_insn_data(env, 0, insn_buf, cnt); in convert_ctx_accesses()
13858 cnt = convert_ctx_access(type, insn, insn_buf, env->prog, in convert_ctx_accesses()
13860 if (cnt == 0 || cnt >= ARRAY_SIZE(insn_buf) || in convert_ctx_accesses()
13869 if (shift && cnt + 1 >= ARRAY_SIZE(insn_buf)) { in convert_ctx_accesses()
13875 insn_buf[cnt++] = BPF_ALU32_IMM(BPF_RSH, in convert_ctx_accesses()
13878 insn_buf[cnt++] = BPF_ALU32_IMM(BPF_AND, insn->dst_reg, in convert_ctx_accesses()
13882 insn_buf[cnt++] = BPF_ALU64_IMM(BPF_RSH, in convert_ctx_accesses()
13885 insn_buf[cnt++] = BPF_ALU32_IMM(BPF_AND, insn->dst_reg, in convert_ctx_accesses()
13890 new_prog = bpf_patch_insn_data(env, i + delta, insn_buf, cnt); in convert_ctx_accesses()
14224 struct bpf_insn insn_buf[16]; in do_misc_fixups() local
14275 cnt = env->ops->gen_ld_abs(insn, insn_buf); in do_misc_fixups()
14276 if (cnt == 0 || cnt >= ARRAY_SIZE(insn_buf)) { in do_misc_fixups()
14281 new_prog = bpf_patch_insn_data(env, i + delta, insn_buf, cnt); in do_misc_fixups()
14296 struct bpf_insn *patch = &insn_buf[0]; in do_misc_fixups()
14332 cnt = patch - insn_buf; in do_misc_fixups()
14334 new_prog = bpf_patch_insn_data(env, i + delta, insn_buf, cnt); in do_misc_fixups()
14418 insn_buf[0] = BPF_JMP_IMM(BPF_JGE, BPF_REG_3, in do_misc_fixups()
14420 insn_buf[1] = BPF_ALU32_IMM(BPF_AND, BPF_REG_3, in do_misc_fixups()
14424 insn_buf[2] = *insn; in do_misc_fixups()
14426 new_prog = bpf_patch_insn_data(env, i + delta, insn_buf, cnt); in do_misc_fixups()
14454 insn_buf[0] = ld_addrs[0]; in do_misc_fixups()
14455 insn_buf[1] = ld_addrs[1]; in do_misc_fixups()
14456 insn_buf[2] = *insn; in do_misc_fixups()
14459 new_prog = bpf_patch_insn_data(env, i + delta, insn_buf, cnt); in do_misc_fixups()
14473 insn_buf[0] = BPF_MOV64_IMM(BPF_REG_5, (__force __s32)GFP_KERNEL); in do_misc_fixups()
14475 insn_buf[0] = BPF_MOV64_IMM(BPF_REG_5, (__force __s32)GFP_ATOMIC); in do_misc_fixups()
14476 insn_buf[1] = *insn; in do_misc_fixups()
14479 new_prog = bpf_patch_insn_data(env, i + delta, insn_buf, cnt); in do_misc_fixups()
14511 cnt = ops->map_gen_lookup(map_ptr, insn_buf); in do_misc_fixups()
14514 if (cnt <= 0 || cnt >= ARRAY_SIZE(insn_buf)) { in do_misc_fixups()
14520 insn_buf, cnt); in do_misc_fixups()
14596 insn_buf[0] = ld_jiffies_addr[0]; in do_misc_fixups()
14597 insn_buf[1] = ld_jiffies_addr[1]; in do_misc_fixups()
14598 insn_buf[2] = BPF_LDX_MEM(BPF_DW, BPF_REG_0, in do_misc_fixups()
14602 new_prog = bpf_patch_insn_data(env, i + delta, insn_buf, in do_misc_fixups()
14617 insn_buf[0] = BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -8); in do_misc_fixups()
14618 insn_buf[1] = BPF_JMP32_REG(BPF_JGE, BPF_REG_2, BPF_REG_0, 6); in do_misc_fixups()
14619 insn_buf[2] = BPF_ALU64_IMM(BPF_LSH, BPF_REG_2, 3); in do_misc_fixups()
14620 insn_buf[3] = BPF_ALU64_REG(BPF_ADD, BPF_REG_2, BPF_REG_1); in do_misc_fixups()
14621 insn_buf[4] = BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_2, 0); in do_misc_fixups()
14622 insn_buf[5] = BPF_STX_MEM(BPF_DW, BPF_REG_3, BPF_REG_0, 0); in do_misc_fixups()
14623 insn_buf[6] = BPF_MOV64_IMM(BPF_REG_0, 0); in do_misc_fixups()
14624 insn_buf[7] = BPF_JMP_A(1); in do_misc_fixups()
14625 insn_buf[8] = BPF_MOV64_IMM(BPF_REG_0, -EINVAL); in do_misc_fixups()
14628 new_prog = bpf_patch_insn_data(env, i + delta, insn_buf, cnt); in do_misc_fixups()
14644 insn_buf[0] = BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -8); in do_misc_fixups()
14645 insn_buf[1] = BPF_ALU64_IMM(BPF_LSH, BPF_REG_0, 3); in do_misc_fixups()
14646 insn_buf[2] = BPF_ALU64_REG(BPF_ADD, BPF_REG_0, BPF_REG_1); in do_misc_fixups()
14647 insn_buf[3] = BPF_LDX_MEM(BPF_DW, BPF_REG_3, BPF_REG_0, 0); in do_misc_fixups()
14648 insn_buf[4] = BPF_STX_MEM(BPF_DW, BPF_REG_2, BPF_REG_3, 0); in do_misc_fixups()
14649 insn_buf[5] = BPF_MOV64_IMM(BPF_REG_0, 0); in do_misc_fixups()
14652 insn_buf[0] = BPF_MOV64_IMM(BPF_REG_0, -EOPNOTSUPP); in do_misc_fixups()
14656 new_prog = bpf_patch_insn_data(env, i + delta, insn_buf, cnt); in do_misc_fixups()
14670 insn_buf[0] = BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -8); in do_misc_fixups()
14672 new_prog = bpf_patch_insn_data(env, i + delta, insn_buf, 1); in do_misc_fixups()
14685 insn_buf[0] = BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -16); in do_misc_fixups()
14687 new_prog = bpf_patch_insn_data(env, i + delta, insn_buf, 1); in do_misc_fixups()
14753 struct bpf_insn insn_buf[] = { in inline_bpf_loop() local
14792 *cnt = ARRAY_SIZE(insn_buf); in inline_bpf_loop()
14793 new_prog = bpf_patch_insn_data(env, position, insn_buf, *cnt); in inline_bpf_loop()