Commit 9c2b840a authored by Linus Torvalds's avatar Linus Torvalds

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
parents 47477c84 45be2ad0
...@@ -27,7 +27,9 @@ VERSION { ...@@ -27,7 +27,9 @@ VERSION {
__vdso_time; __vdso_time;
clock_getres; clock_getres;
__vdso_clock_getres; __vdso_clock_getres;
#ifdef CONFIG_X86_SGX
__vdso_sgx_enter_enclave; __vdso_sgx_enter_enclave;
#endif
local: *; local: *;
}; };
} }
...@@ -624,7 +624,7 @@ void __init_or_module noinline apply_ibt_endbr(s32 *start, s32 *end) ...@@ -624,7 +624,7 @@ void __init_or_module noinline apply_ibt_endbr(s32 *start, s32 *end)
#else #else
void __init_or_module noinline apply_ibt_endbr(s32 *start, s32 *end) { } void __init_or_module apply_ibt_endbr(s32 *start, s32 *end) { }
#endif /* CONFIG_X86_KERNEL_IBT */ #endif /* CONFIG_X86_KERNEL_IBT */
......
...@@ -722,8 +722,9 @@ static int branch_setup_xol_ops(struct arch_uprobe *auprobe, struct insn *insn) ...@@ -722,8 +722,9 @@ static int branch_setup_xol_ops(struct arch_uprobe *auprobe, struct insn *insn)
switch (opc1) { switch (opc1) {
case 0xeb: /* jmp 8 */ case 0xeb: /* jmp 8 */
case 0xe9: /* jmp 32 */ case 0xe9: /* jmp 32 */
case 0x90: /* prefix* + nop; same as jmp with .offs = 0 */
break; break;
case 0x90: /* prefix* + nop; same as jmp with .offs = 0 */
goto setup;
case 0xe8: /* call relative */ case 0xe8: /* call relative */
branch_clear_offset(auprobe, insn); branch_clear_offset(auprobe, insn);
...@@ -753,6 +754,7 @@ static int branch_setup_xol_ops(struct arch_uprobe *auprobe, struct insn *insn) ...@@ -753,6 +754,7 @@ static int branch_setup_xol_ops(struct arch_uprobe *auprobe, struct insn *insn)
return -ENOTSUPP; return -ENOTSUPP;
} }
setup:
auprobe->branch.opc1 = opc1; auprobe->branch.opc1 = opc1;
auprobe->branch.ilen = insn->length; auprobe->branch.ilen = insn->length;
auprobe->branch.offs = insn->immediate.value; auprobe->branch.offs = insn->immediate.value;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment