Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'x86-urgent-2022-12-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Thomas Gleixner:
"Three small x86 fixes which did not make it into 6.1:

- Remove a superfluous noinline which prevents GCC-7.3 to optimize a
stub function away

- Allow uprobes on REP NOP and do not treat them like word-sized
branch instructions

- Make the VDSO symbol export of __vdso_sgx_enter_enclave() depend on
CONFIG_X86_SGX to prevent build failures with newer LLVM versions
which rightfully detect that there is no function behind the
symbol"

* tag 'x86-urgent-2022-12-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/vdso: Conditionally export __vdso_sgx_enter_enclave()
uprobes/x86: Allow to probe a NOP instruction with 0x66 prefix
x86/alternative: Remove noinline from __ibt_endbr_seal[_end]() stubs

+6 -2
+2
arch/x86/entry/vdso/vdso.lds.S
··· 27 27 __vdso_time; 28 28 clock_getres; 29 29 __vdso_clock_getres; 30 + #ifdef CONFIG_X86_SGX 30 31 __vdso_sgx_enter_enclave; 32 + #endif 31 33 local: *; 32 34 }; 33 35 }
+1 -1
arch/x86/kernel/alternative.c
··· 624 624 625 625 #else 626 626 627 - void __init_or_module noinline apply_ibt_endbr(s32 *start, s32 *end) { } 627 + void __init_or_module apply_ibt_endbr(s32 *start, s32 *end) { } 628 628 629 629 #endif /* CONFIG_X86_KERNEL_IBT */ 630 630
+3 -1
arch/x86/kernel/uprobes.c
··· 722 722 switch (opc1) { 723 723 case 0xeb: /* jmp 8 */ 724 724 case 0xe9: /* jmp 32 */ 725 - case 0x90: /* prefix* + nop; same as jmp with .offs = 0 */ 726 725 break; 726 + case 0x90: /* prefix* + nop; same as jmp with .offs = 0 */ 727 + goto setup; 727 728 728 729 case 0xe8: /* call relative */ 729 730 branch_clear_offset(auprobe, insn); ··· 754 753 return -ENOTSUPP; 755 754 } 756 755 756 + setup: 757 757 auprobe->branch.opc1 = opc1; 758 758 auprobe->branch.ilen = insn->length; 759 759 auprobe->branch.offs = insn->immediate.value;