Lines Matching defs:ip

460 static int emit_patch(u8 **pprog, void *func, void *ip, u8 opcode)
465 offset = func - (ip + X86_PATCH_SIZE);
475 static int emit_call(u8 **pprog, void *func, void *ip)
477 return emit_patch(pprog, func, ip, 0xE8);
480 static int emit_rsb_call(u8 **pprog, void *func, void *ip)
483 ip += x86_call_depth_emit_accounting(pprog, func, ip);
484 return emit_patch(pprog, func, ip, 0xE8);
487 static int emit_jump(u8 **pprog, void *func, void *ip)
489 return emit_patch(pprog, func, ip, 0xE9);
492 static int __bpf_arch_text_poke(void *ip, enum bpf_text_poke_type t,
505 emit_call(&prog, old_addr, ip) :
506 emit_jump(&prog, old_addr, ip);
515 emit_call(&prog, new_addr, ip) :
516 emit_jump(&prog, new_addr, ip);
523 if (memcmp(ip, old_insn, X86_PATCH_SIZE))
526 if (memcmp(ip, new_insn, X86_PATCH_SIZE)) {
527 text_poke_bp(ip, new_insn, X86_PATCH_SIZE, NULL);
535 int bpf_arch_text_poke(void *ip, enum bpf_text_poke_type t,
538 if (!is_kernel_text((long)ip) &&
539 !is_bpf_text_address((long)ip))
547 if (is_endbr(*(u32 *)ip))
548 ip += ENDBR_INSN_SIZE;
550 return __bpf_arch_text_poke(ip, t, old_addr, new_addr);
555 static void emit_indirect_jump(u8 **pprog, int reg, u8 *ip)
565 emit_jump(&prog, &__x86_indirect_jump_thunk_array[reg], ip);
567 emit_jump(&prog, &__x86_indirect_thunk_array[reg], ip);
577 static void emit_return(u8 **pprog, u8 *ip)
582 emit_jump(&prog, x86_return_thunk, ip);
608 u32 stack_depth, u8 *ip,
681 emit_indirect_jump(&prog, 1 /* rcx */, ip + (prog - start));
690 u8 **pprog, u8 *ip,
710 poke->tailcall_bypass = ip + (prog - start);
712 poke->tailcall_target = ip + ctx->tail_call_direct_label - X86_PATCH_SIZE;
1181 regs->ip += x->fixup & 0xff;
1898 * pt_regs->ip to jump over this x86 instruction
1968 u8 *ip = image + addrs[i - 1];
1973 ip += 7;
1977 ip += x86_call_depth_emit_accounting(&prog, func, ip);
1978 if (emit_call(&prog, func, ip))
2577 static int emit_cond_near_jump(u8 **pprog, void *func, void *ip, u8 jmp_cond)
2582 offset = func - (ip + 2 + 4);
3397 void arch_bpf_stack_walk(bool (*consume_fn)(void *cookie, u64 ip, u64 sp, u64 bp), void *cookie)