Re: [PATCH v3 06/10] x86: elf: Use e_machine to select start_thread for x32
From: Andy Lutomirski
Date: Wed Oct 07 2020 - 20:06:20 EST
On Sat, Oct 3, 2020 at 8:26 PM Gabriel Krisman Bertazi
<krisman@xxxxxxxxxxxxx> wrote:
>
> Since TIF_X32 is going away, avoid using it to find the ELF type in
> compat_start_thread.
>
> 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
> start_thread in compat mode.
Hmm, I suppose I can live with this. It's not fundamentally worse
than any of the other ELF compat hacks.
Reviewed-by: Andy Lutomirski <luto@xxxxxxxxxx>