x86/elf: Use e_machine to check for x32/ia32 in setup_additional_pages()
authorGabriel Krisman Bertazi <krisman@collabora.com>
Sun, 4 Oct 2020 03:25:34 +0000 (23:25 -0400)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 26 Oct 2020 12:46:47 +0000 (13:46 +0100)
commit3316ec8ccd34e19690a12e65801d605d25155031
treefca510ae72ae30b08ed87d35f9ed49d51840276a
parent9a29a671902c2be05d636045a4dd365219ca716c
x86/elf: Use e_machine to check for x32/ia32 in setup_additional_pages()

Since TIF_X32 is going away, avoid using it to find the ELF type when
choosing which additional pages to set up.

According to SysV AMD64 ABI Draft, an AMD64 ELF object using ILP32 must
have ELFCLASS32 with (E_MACHINE == EM_X86_64), so use that ELF field to
differentiate a x32 object from a IA32 object when executing
setup_additional_pages() in compat mode.

Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20201004032536.1229030-9-krisman@collabora.com
arch/x86/entry/vdso/vma.c
arch/x86/include/asm/elf.h