https://github.com/torvalds/linux
Revision 794baba637999b81aa40e60fae1fa91978e08808 authored by Lennert Buytenhek on 05 December 2008, 02:25:47 UTC, committed by Russell King on 06 December 2008, 08:32:02 UTC
Commit 8ec53663d2698076468b3e1edc4e1b418bd54de3 ("[ARM] Improve
non-executable support") added support for detecting non-executable
stack binaries.  One of the things it does is to make READ_IMPLIES_EXEC
be set in ->personality if we are running on a CPU that doesn't support
the XN ("Execute Never") page table bit or if we are running a binary
that needs an executable stack.

This exposed a latent bug in ARM's asm/processor.h due to which we'll
end up placing the stack at a very low address, where it will bump into
the heap on any application that uses significant amount of stack or
heap or both, causing many interesting crashes.

Fix this by testing the ADDR_LIMIT_32BIT bit in ->personality instead
of testing for equality against PER_LINUX_32BIT.

Reviewed-by: Nicolas Pitre <nico@marvell.com>

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
1 parent 94fc733
History
Tip revision: 794baba637999b81aa40e60fae1fa91978e08808 authored by Lennert Buytenhek on 05 December 2008, 02:25:47 UTC
[ARM] 5340/1: fix stack placement after noexecstack changes
Tip revision: 794baba
File Mode Size
Documentation
arch
block
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
usr
virt
.gitignore -rw-r--r-- 867 bytes
.mailmap -rw-r--r-- 3.8 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 91.0 KB
Kbuild -rw-r--r-- 2.4 KB
MAINTAINERS -rw-r--r-- 103.3 KB
Makefile -rw-r--r-- 55.9 KB
README -rw-r--r-- 16.5 KB
REPORTING-BUGS -rw-r--r-- 3.1 KB

README

back to top