[PATCH v4 3/6] x86/entry: Compile entry_SYSCALL32_ignore() unconditionally

From: Nikolay Borisov
Date: Fri Jun 23 2023 - 07:14:26 EST


To limit the IA32 exposure on 64bit kernels while keeping the
flexibility for the user to enable it when required, the compile time
enable/disable via CONFIG_IA32_EMULATION is not good enough and will
be complemented with a kernel command line option.

Right now entry_SYSCALL32_ignore() is only compiled when
CONFIG_IA32_EMULATION=n, but boot-time enable- / disablement obviously
requires it to be unconditionally available.

Remove the #ifndef CONFIG_IA32_EMULATION guard.

Signed-off-by: Nikolay Borisov <nik.borisov@xxxxxxxx>
---
arch/x86/entry/entry_64.S | 2 --
1 file changed, 2 deletions(-)

diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S
index ccce0ccd8589..7068af44008a 100644
--- a/arch/x86/entry/entry_64.S
+++ b/arch/x86/entry/entry_64.S
@@ -1514,7 +1514,6 @@ SYM_CODE_START(asm_exc_nmi)
iretq
SYM_CODE_END(asm_exc_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.
@@ -1525,7 +1524,6 @@ SYM_CODE_START(entry_SYSCALL32_ignore)
mov $-ENOSYS, %eax
sysretl
SYM_CODE_END(entry_SYSCALL32_ignore)
-#endif

.pushsection .text, "ax"
__FUNC_ALIGN
--
2.34.1