Lines Matching +full:0 +full:x12345678

41 #define DA_ALL		(~0)
42 #define DA_ALT 0x01
43 #define DA_RET 0x02
44 #define DA_RETPOLINE 0x04
45 #define DA_ENDBR 0x08
46 #define DA_SMP 0x10
55 if (!str || kstrtouint(str, 0, &debug_alternative)) in debug_alt()
75 } while (0)
86 for (j = 0; j < (len) - 1; j++) \
90 } while (0)
187 if (insn->opcode.bytes[0] == 0x90 && in insn_is_nop()
188 (!insn->prefixes.nbytes || insn->prefixes.bytes[0] != 0xF3)) in insn_is_nop()
192 if (insn->opcode.bytes[0] == 0x0F && insn->opcode.bytes[1] == 0x1F) in insn_is_nop()
225 for (int next, i = 0; i < len; i = next) { in optimize_nops()
293 } while (0)
320 for (int next, i = 0; i < instrlen; i = next) { in __apply_relocation()
328 switch (insn.opcode.bytes[0]) { in __apply_relocation()
329 case 0x0f: in __apply_relocation()
330 if (insn.opcode.bytes[1] < 0x80 || in __apply_relocation()
331 insn.opcode.bytes[1] > 0x8f) in __apply_relocation()
335 case 0x70 ... 0x7f: /* Jcc.d8 */ in __apply_relocation()
348 if (insn.opcode.bytes[0] == JMP32_INSN_OPCODE) { in __apply_relocation()
353 buf[i+0] = JMP8_INSN_OPCODE; in __apply_relocation()
388 #define CALL_RIP_REL_OPCODE 0xff
389 #define CALL_RIP_REL_MODRM 0x15
400 if (a->replacementlen != 5 || insn_buff[0] != CALL_INSN_OPCODE) { in alt_replace_call()
406 instr[0] != CALL_RIP_REL_OPCODE || in alt_replace_call()
415 /* ff 15 00 00 00 00 call *0x0(%rip) */ in alt_replace_call()
419 /* ff 15 00 00 00 00 call *0x0 */ in alt_replace_call()
430 return 0; in alt_replace_call()
479 int insn_buff_sz = 0; in apply_alternatives()
510 DPRINTK(ALT, "feat: %d*32+%d, old: (%pS (%px) len: %d), repl: (%px, len: %d) flags: 0x%x", in apply_alternatives()
512 a->cpuid & 0x1f, in apply_alternatives()
521 if (insn_buff_sz < 0) in apply_alternatives()
526 insn_buff[insn_buff_sz] = 0x90; in apply_alternatives()
542 /* Jcc.d32 second opcode byte is in the range: 0x80-0x8f */ in is_jcc32()
543 return insn->opcode.bytes[0] == 0x0f && (insn->opcode.bytes[1] & 0xf0) == 0x80; in is_jcc32()
553 int i = 0; in emit_indirect()
558 modrm = 0x10; /* Reg = 2; CALL r/m */ in emit_indirect()
562 modrm = 0x20; /* Reg = 4; JMP r/m */ in emit_indirect()
571 bytes[i++] = 0x41; /* REX.B prefix */ in emit_indirect()
575 modrm |= 0xc0; /* Mod = 3 */ in emit_indirect()
578 bytes[i++] = 0xff; /* opcode */ in emit_indirect()
586 u8 op = insn->opcode.bytes[0]; in emit_call_track_retpoline()
587 int i = 0; in emit_call_track_retpoline()
600 bytes[i++] = 0x2e; /* CS-prefix */ in emit_call_track_retpoline()
647 int reg, ret, i = 0; in patch_retpoline()
653 if (WARN_ON_ONCE(reg & ~0xf)) in patch_retpoline()
667 op = insn->opcode.bytes[0]; in patch_retpoline()
683 cc = insn->opcode.bytes[1] & 0xf; in patch_retpoline()
686 bytes[i++] = 0x70 + cc; /* Jcc.d8 */ in patch_retpoline()
697 bytes[i++] = 0x0f; in patch_retpoline()
698 bytes[i++] = 0xae; in patch_retpoline()
699 bytes[i++] = 0xe8; /* LFENCE */ in patch_retpoline()
703 if (ret < 0) in patch_retpoline()
737 if (WARN_ON_ONCE(ret < 0)) in apply_retpolines()
740 op1 = insn.opcode.bytes[0]; in apply_retpolines()
748 case 0x0f: /* escape */ in apply_retpolines()
749 if (op2 >= 0x80 && op2 <= 0x8f) in apply_retpolines()
786 int i = 0; in patch_return()
817 if (WARN_ON_ONCE(ret < 0)) in apply_returns()
820 op = insn.opcode.bytes[0]; in apply_returns()
932 " .p2align 2, 0x0 \n"
949 " .p2align 2, 0x0 \n"
969 return 0; in cfi_get_func_hash()
973 return 0; in cfi_get_func_hash()
995 hash ^= 0x80200003; in cfi_rehash()
1008 *next = 0; in cfi_parse_cmdline()
1030 return 0; in cfi_parse_cmdline()
1038 * movl $0x12345678,%eax // 5 endbr64 // 4
1039 * nop subl $0x12345678,%r10d // 7
1053 * movl $(-0x12345678),%r10d // 6 movl $0x12345678,%r10d // 6
1064 " subl $0x12345678, %r10d \n"
1080 " movl $0x12345678, %r10d \n"
1099 /* b8 78 56 34 12 mov $0x12345678,%eax */ in decode_preamble_hash()
1100 if (p[0] == 0xb8) in decode_preamble_hash()
1103 return 0; /* invalid hash value */ in decode_preamble_hash()
1110 /* 41 ba 78 56 34 12 mov $0x12345678,%r10d */ in decode_caller_hash()
1111 if (p[0] == 0x41 && p[1] == 0xba) in decode_caller_hash()
1114 /* e8 0c 78 56 34 12 jmp.d8 +12 */ in decode_caller_hash()
1115 if (p[0] == JMP8_INSN_OPCODE && p[1] == fineibt_caller_jmp) in decode_caller_hash()
1118 return 0; /* invalid hash value */ in decode_caller_hash()
1144 return 0; in cfi_disable_callers()
1152 const u8 mov[] = { 0x41, 0xba }; in cfi_enable_callers()
1167 return 0; in cfi_enable_callers()
1188 return 0; in cfi_rand_preamble()
1205 WARN_ON(*(u32 *)(addr + fineibt_preamble_hash) != 0x12345678); in cfi_rewrite_preamble()
1209 return 0; in cfi_rewrite_preamble()
1240 return 0; in cfi_rand_callers()
1255 WARN_ON(*(u32 *)(addr + fineibt_caller_hash) != 0x12345678); in cfi_rewrite_callers()
1261 return 0; in cfi_rewrite_callers()
1330 /* now that nobody targets func()+0, remove ENDBR there */ in __apply_fineibt()
1347 *(u32 *)addr = 0; in poison_hash()
1357 * subl $0, %r10d in poison_cfi()
1369 * movl $0, %eax in poison_cfi()
1370 * .skip 11, 0x90 in poison_cfi()
1413 if (*ptr == 0x3e) in alternatives_smp_lock()
1414 text_poke(ptr, ((unsigned char []){0xf0}), 1); in alternatives_smp_lock()
1429 if (*ptr == 0xf0) in alternatives_smp_unlock()
1430 text_poke(ptr, ((unsigned char []){0x3E}), 1); in alternatives_smp_unlock()
1517 clear_cpu_cap(&cpu_data(0), X86_FEATURE_UP); in alternatives_enable_smp()
1550 return 0; in alternatives_text_reserved()
1614 unsigned int val = 0; in int3_selftest()
1652 * lea 0x0(%rip),%rdi # 5d0: R_X86_64_PC32 .init.data+0x5566c in alt_reloc_selftest()
1653 * call +0 # 5d5: R_X86_64_PLT32 __alt_reloc_selftest-0x4 in alt_reloc_selftest()
1875 pages[0] = vmalloc_to_page(addr); in __text_poke()
1879 pages[0] = virt_to_page(addr); in __text_poke()
1880 WARN_ON(!PageReserved(pages[0])); in __text_poke()
1888 BUG_ON(!pages[0] || (cross_page_boundary && !pages[1])); in __text_poke()
1908 pte = mk_pte(pages[0], pgprot); in __text_poke()
2010 size_t patched = 0; in text_poke_copy_locked()
2059 size_t patched = 0; in text_poke_set()
2090 * this thing. When len == 6 everything is prefixed with 0x0f and we map
2144 return 0; in patch_cmp()
2151 int ret = 0; in poke_int3_handler()
2155 return 0; in poke_int3_handler()
2163 * write INT3 if (bp_desc.refs != 0) in poke_int3_handler()
2169 return 0; in poke_int3_handler()
2214 case 0x70 ... 0x7f: /* Jcc */ in poke_int3_handler()
2215 int3_emulate_jcc(regs, tp->opcode & 0xf, (long)ip, tp->disp); in poke_int3_handler()
2290 for (i = 0; i < nr_entries; i++) { in text_poke_bp_batch()
2300 for (do_sync = 0, i = 0; i < nr_entries; i++) { in text_poke_bp_batch()
2306 if (len - INT3_INSN_SIZE > 0) { in text_poke_bp_batch()
2312 _new[0] = 0x0f; in text_poke_bp_batch()
2364 for (do_sync = 0, i = 0; i < nr_entries; i++) { in text_poke_bp_batch()
2365 u8 byte = tp[i].text[0]; in text_poke_bp_batch()
2368 byte = 0x0f; in text_poke_bp_batch()
2391 int ret, i = 0; in text_poke_loc_init()
2400 BUG_ON(ret < 0); in text_poke_loc_init()
2404 tp->opcode = insn.opcode.bytes[0]; in text_poke_loc_init()
2410 tp->opcode = insn.opcode.bytes[1] - 0x10; in text_poke_loc_init()
2437 case 0x70 ... 0x7f: /* Jcc */ in text_poke_loc_init()
2443 case 2: /* NOP2 -- emulate as JMP8+0 */ in text_poke_loc_init()
2446 tp->disp = 0; in text_poke_loc_init()
2449 case 5: /* NOP5 -- emulate as JMP32+0 */ in text_poke_loc_init()
2452 tp->disp = 0; in text_poke_loc_init()
2487 tp_vec_nr = 0; in text_poke_flush()