https://github.com/torvalds/linux
Revision 16dd46bb781a1d37eeb2377e8e48276e9d14d15d authored by Catalin Marinas on 16 October 2012, 16:07:46 UTC, committed by Catalin Marinas on 18 October 2012, 19:14:01 UTC
For historical reasons, ARM used to set r0-r2 in start_thread() to the
first values on the user stack when starting a new user application. The
same logic has been inherited in AArch64. The x0 register is overridden
by the sys_execve() return value so it's always zero on success. The x1
and x2 registers are ignored by AArch64 and EABI AArch32 applications,
so we can safely remove the register setting for both native and compat
user space.

This also fixes a potential fault with the kernel accessing user space
stack directly.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Reported-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent f71a1a4
History
Tip revision: 16dd46bb781a1d37eeb2377e8e48276e9d14d15d authored by Catalin Marinas on 16 October 2012, 16:07:46 UTC
arm64: No need to set the x0-x2 registers in start_thread()
Tip revision: 16dd46b
File Mode Size
Documentation
arch
block
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.gitignore -rw-r--r-- 1.2 KB
.mailmap -rw-r--r-- 4.4 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 92.7 KB
Kbuild -rw-r--r-- 2.5 KB
Kconfig -rw-r--r-- 252 bytes
MAINTAINERS -rw-r--r-- 221.8 KB
Makefile -rw-r--r-- 46.2 KB
README -rw-r--r-- 18.2 KB
REPORTING-BUGS -rw-r--r-- 3.3 KB

README

back to top