From: Andy Lutomirski Date: Tue, 2 Jul 2019 03:43:20 +0000 (-0700) Subject: x86/entry/64: Don't compile ignore_sysret if 32-bit emulation is enabled X-Git-Tag: v5.4-rc1~683^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dffb3f9db6b593f3ed6ab4c8d8f10e0aa6aa7a88;p=platform%2Fkernel%2Flinux-rpi.git x86/entry/64: Don't compile ignore_sysret if 32-bit emulation is enabled It's only used if !CONFIG_IA32_EMULATION, so disable it in normal configs. This will save a few bytes of text and reduce confusion. Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Cc: "BaeChang Seok" Cc: Borislav Petkov Cc: Peter Zijlstra Cc: "Bae, Chang Seok" Link: https://lkml.kernel.org/r/0f7dafa72fe7194689de5ee8cfe5d83509fabcf5.1562035429.git.luto@kernel.org --- diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S index 7f9f511..54b1b04 100644 --- a/arch/x86/entry/entry_64.S +++ b/arch/x86/entry/entry_64.S @@ -1743,11 +1743,17 @@ nmi_restore: iretq END(nmi) +#ifndef CONFIG_IA32_EMULATION +/* + * This handles SYSCALL from 32-bit code. There is no way to program + * MSRs to fully disable 32-bit SYSCALL. + */ ENTRY(ignore_sysret) UNWIND_HINT_EMPTY mov $-ENOSYS, %eax sysret END(ignore_sysret) +#endif ENTRY(rewind_stack_do_exit) UNWIND_HINT_FUNC