diff options
| author | Nikolay Borisov <[email protected]> | 2023-06-23 11:14:04 +0000 |
|---|---|---|
| committer | Thomas Gleixner <[email protected]> | 2023-09-14 11:19:53 +0000 |
| commit | 1da5c9bc119d3a749b519596b93f9b2667e93c4a (patch) | |
| tree | 03602b88f850bf5c6a0ed3d3a3bfab7fc98b3502 /arch/x86/entry/common.c | |
| parent | Linux 6.6-rc1 (diff) | |
| download | kernel-1da5c9bc119d3a749b519596b93f9b2667e93c4a.tar.gz kernel-1da5c9bc119d3a749b519596b93f9b2667e93c4a.zip | |
x86: Introduce ia32_enabled()
IA32 support on 64bit kernels depends on whether CONFIG_IA32_EMULATION
is selected or not. As it is a compile time option it doesn't
provide the flexibility to have distributions set their own policy for
IA32 support and give the user the flexibility to override it.
As a first step introduce ia32_enabled() which abstracts whether IA32
compat is turned on or off. Upcoming patches will implement
the ability to set IA32 compat state at boot time.
Signed-off-by: Nikolay Borisov <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'arch/x86/entry/common.c')
| -rw-r--r-- | arch/x86/entry/common.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/entry/common.c b/arch/x86/entry/common.c index 6c2826417b33..cfbd3aec3ddc 100644 --- a/arch/x86/entry/common.c +++ b/arch/x86/entry/common.c @@ -96,6 +96,10 @@ static __always_inline int syscall_32_enter(struct pt_regs *regs) return (int)regs->orig_ax; } +#ifdef CONFIG_IA32_EMULATION +bool __ia32_enabled __ro_after_init = true; +#endif + /* * Invoke a 32-bit syscall. Called with IRQs on in CONTEXT_KERNEL. */ |
