Skip to content

Commit

Permalink
x86/entry: Compile entry_SYSCALL32_ignore() unconditionally
Browse files Browse the repository at this point in the history
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@suse.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20230623111409.3047467-4-nik.borisov@suse.com
  • Loading branch information
Nikolay Borisov authored and Thomas Gleixner committed Sep 14, 2023
1 parent f71e1d2 commit 370dcd5
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions arch/x86/entry/entry_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -1511,7 +1511,6 @@ nmi_restore:
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.
Expand All @@ -1522,7 +1521,6 @@ SYM_CODE_START(entry_SYSCALL32_ignore)
mov $-ENOSYS, %eax
sysretl
SYM_CODE_END(entry_SYSCALL32_ignore)
#endif

.pushsection .text, "ax"
__FUNC_ALIGN
Expand Down

0 comments on commit 370dcd5

Please sign in to comment.