]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
x86: Reject x32 executables if x32 ABI not supported
authorBen Hutchings <ben@decadent.org.uk>
Sun, 7 Sep 2014 20:05:05 +0000 (21:05 +0100)
committerZefan Li <lizefan@huawei.com>
Mon, 2 Feb 2015 09:04:47 +0000 (17:04 +0800)
commitdb55550da4a9ca71d76f47286a5a9790f12a2868
tree52f660491b1a2a088e5802d8899301a30a435674
parent9be2cb104b9a741878720a41911b7c4739dde12b
x86: Reject x32 executables if x32 ABI not supported

commit 0e6d3112a4e95d55cf6dca88f298d5f4b8f29bd1 upstream.

It is currently possible to execve() an x32 executable on an x86_64
kernel that has only ia32 compat enabled.  However all its syscalls
will fail, even _exit().  This usually causes it to segfault.

Change the ELF compat architecture check so that x32 executables are
rejected if we don't support the x32 ABI.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Link: http://lkml.kernel.org/r/1410120305.6822.9.camel@decadent.org.uk
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Zefan Li <lizefan@huawei.com>
arch/x86/include/asm/elf.h