Skip to content

Commit 5ae2702

Browse files
Nikolay BorisovKAGA-KOKO
authored andcommitted
x86/elf: Make loading of 32bit processes depend on ia32_enabled()
Major aspect of ia32 emulation is the ability to load 32bit processes. That's currently decided (among others) by compat_elf_check_arch(). Make the macro use ia32_enabled() to decide if IA32 compat is enabled before loading a 32bit process. Signed-off-by: Nikolay Borisov <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 370dcd5 commit 5ae2702

File tree

1 file changed

+2
-1
lines changed
  • arch/x86/include/asm

1 file changed

+2
-1
lines changed

arch/x86/include/asm/elf.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
*/
88
#include <linux/thread_info.h>
99

10+
#include <asm/ia32.h>
1011
#include <asm/ptrace.h>
1112
#include <asm/user.h>
1213
#include <asm/auxvec.h>
@@ -149,7 +150,7 @@ do { \
149150
((x)->e_machine == EM_X86_64)
150151

151152
#define compat_elf_check_arch(x) \
152-
(elf_check_arch_ia32(x) || \
153+
((elf_check_arch_ia32(x) && ia32_enabled()) || \
153154
(IS_ENABLED(CONFIG_X86_X32_ABI) && (x)->e_machine == EM_X86_64))
154155

155156
static inline void elf_common_init(struct thread_struct *t,

0 commit comments

Comments
 (0)