Home
last modified time | relevance | path

Searched refs:insn_buff (Results 1 – 9 of 9) sorted by relevance

/kernel/linux/linux-5.10/arch/x86/kernel/
Dparavirt_patch.c13 #define PATCH(d, m, insn_buff, len) \ argument
14 paravirt_patch_insns(insn_buff, len, PSTART(d, m), PEND(d, m))
16 #define PATCH_CASE(ops, m, data, insn_buff, len) \ argument
18 return PATCH(data, ops##_##m, insn_buff, len)
48 unsigned int paravirt_patch_ident_64(void *insn_buff, unsigned int len) in paravirt_patch_ident_64() argument
50 return PATCH(xxl, mov64, insn_buff, len); in paravirt_patch_ident_64()
71 unsigned int native_patch(u8 type, void *insn_buff, unsigned long addr, in native_patch() argument
77 PATCH_CASE(irq, restore_fl, xxl, insn_buff, len); in native_patch()
78 PATCH_CASE(irq, save_fl, xxl, insn_buff, len); in native_patch()
79 PATCH_CASE(irq, irq_enable, xxl, insn_buff, len); in native_patch()
[all …]
Dparavirt.c62 static unsigned paravirt_patch_call(void *insn_buff, const void *target, in paravirt_patch_call() argument
66 struct branch *b = insn_buff; in paravirt_patch_call()
89 static unsigned paravirt_patch_jmp(void *insn_buff, const void *target, in paravirt_patch_jmp() argument
92 struct branch *b = insn_buff; in paravirt_patch_jmp()
117 unsigned paravirt_patch_default(u8 type, void *insn_buff, in paravirt_patch_default() argument
129 ret = paravirt_patch_insns(insn_buff, len, ud2a, ud2a+sizeof(ud2a)); in paravirt_patch_default()
136 ret = paravirt_patch_ident_64(insn_buff, len); in paravirt_patch_default()
141 ret = paravirt_patch_jmp(insn_buff, opfunc, addr, len); in paravirt_patch_default()
145 ret = paravirt_patch_call(insn_buff, opfunc, addr, len); in paravirt_patch_default()
150 unsigned paravirt_patch_insns(void *insn_buff, unsigned len, in paravirt_patch_insns() argument
[all …]
Dalternative.c287 recompute_jump(struct alt_instr *a, u8 *orig_insn, u8 *repl_insn, u8 *insn_buff) in recompute_jump() argument
296 o_dspl = *(s32 *)(insn_buff + 1); in recompute_jump()
322 insn_buff[0] = 0xeb; in recompute_jump()
323 insn_buff[1] = (s8)n_dspl; in recompute_jump()
324 add_nops(insn_buff + 2, 3); in recompute_jump()
332 insn_buff[0] = 0xe9; in recompute_jump()
333 *(s32 *)&insn_buff[1] = n_dspl; in recompute_jump()
424 u8 insn_buff[MAX_PATCH_LEN]; in apply_alternatives() local
443 BUG_ON(a->instrlen > sizeof(insn_buff)); in apply_alternatives()
465 memcpy(insn_buff, replacement, a->replacementlen); in apply_alternatives()
[all …]
/kernel/linux/linux-5.10/arch/x86/tools/
Dinsn_sanity.c86 unsigned char *insn_buff, struct insn *insn) in dump_stream() argument
99 fprintf(fp, " %02x", insn_buff[i]); in dump_stream()
127 static int read_next_insn(unsigned char *insn_buff) in read_next_insn() argument
137 insn_buff[i] = (unsigned char)strtoul(tmp, &tmp, 16); in read_next_insn()
145 static int generate_insn(unsigned char *insn_buff) in generate_insn() argument
150 return read_next_insn(insn_buff); in generate_insn()
154 *(unsigned short *)(&insn_buff[i]) = random() & 0xffff; in generate_insn()
157 insn_buff[i++] = random() & 0xff; in generate_insn()
229 unsigned char insn_buff[MAX_INSN_SIZE * 2]; in main() local
234 memset(insn_buff + MAX_INSN_SIZE, INSN_NOP, MAX_INSN_SIZE); in main()
[all …]
Dinsn_decoder_test.c114 unsigned char insn_buff[16]; in main() local
133 memset(insn_buff, 0, 16); in main()
146 insn_buff[nb++] = (unsigned char) b; in main()
152 insn_init(&insn, insn_buff, sizeof(insn_buff), x86_64); in main()
/kernel/linux/linux-5.10/arch/x86/kernel/kprobes/
Dopt.c477 u8 insn_buff[JMP32_INSN_SIZE]; in arch_optimize_kprobes() local
489 insn_buff[0] = JMP32_INSN_OPCODE; in arch_optimize_kprobes()
490 *(s32 *)(&insn_buff[1]) = rel; in arch_optimize_kprobes()
492 text_poke_bp(op->kp.addr, insn_buff, JMP32_INSN_SIZE, NULL); in arch_optimize_kprobes()
/kernel/linux/linux-5.10/arch/x86/include/asm/
Dparavirt_types.h86 unsigned (*patch)(u8 type, void *insn_buff,
346 unsigned paravirt_patch_ident_64(void *insn_buff, unsigned len);
347 unsigned paravirt_patch_default(u8 type, void *insn_buff, unsigned long addr, unsigned len);
348 unsigned paravirt_patch_insns(void *insn_buff, unsigned len, const char *start, const char *end);
350 unsigned native_patch(u8 type, void *insn_buff, unsigned long addr, unsigned len);
/kernel/linux/linux-5.10/arch/x86/events/intel/
Dds.c341 void *buffer, *insn_buff, *cea; in alloc_pebs_buffer() local
355 insn_buff = kzalloc_node(PEBS_FIXUP_SIZE, GFP_KERNEL, node); in alloc_pebs_buffer()
356 if (!insn_buff) { in alloc_pebs_buffer()
360 per_cpu(insn_buffer, cpu) = insn_buff; in alloc_pebs_buffer()
/kernel/linux/linux-5.10/kernel/bpf/
Dcore.c1140 struct bpf_insn insn_buff[16], aux[2]; in bpf_jit_blind_constants() local
1165 rewritten = bpf_jit_blind_insn(insn, aux, insn_buff, in bpf_jit_blind_constants()
1170 tmp = bpf_patch_insn_single(clone, i, insn_buff, rewritten); in bpf_jit_blind_constants()