x86: Make IA32_EMULATION boot time configurable
authorNikolay Borisov <nik.borisov@suse.com>
Fri, 23 Jun 2023 11:14:09 +0000 (14:14 +0300)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 14 Sep 2023 11:19:53 +0000 (13:19 +0200)
commita11e097504ac1889b35b6858f495565838325f88
tree29b1e60da1b2f02f8641da78cf2f116535971480
parent61382281e9054df523d3f9cfdba2faff88955f97
x86: Make IA32_EMULATION boot time configurable

Distributions would like to reduce their attack surface as much as
possible but at the same time they'd want to retain flexibility to cater
to a variety of legacy software. This stems from the conjecture that
compat layer is likely rarely tested and could have latent security
bugs. Ideally distributions will set their default policy and also
give users the ability to override it as appropriate.

To enable this use case, introduce CONFIG_IA32_EMULATION_DEFAULT_DISABLED
compile time option, which controls whether 32bit processes/syscalls
should be allowed or not. This option is aimed mainly at distributions
to set their preferred default behavior in their kernels.

To allow users to override the distro's policy, introduce the 'ia32_emulation'
parameter which allows overriding CONFIG_IA32_EMULATION_DEFAULT_DISABLED
state at boot time.

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-7-nik.borisov@suse.com
Documentation/admin-guide/kernel-parameters.txt
arch/x86/Kconfig
arch/x86/entry/common.c