linux/arch/arm64
Catalin Marinas 16dd46bb78 arm64: No need to set the x0-x2 registers in start_thread()
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>
2012-10-18 20:14:01 +01:00
..
boot arm64: Build infrastructure 2012-09-17 13:42:21 +01:00
configs arm64: Build infrastructure 2012-09-17 13:42:21 +01:00
include arm64: No need to set the x0-x2 registers in start_thread() 2012-10-18 20:14:01 +01:00
kernel arm64: Ignore memory blocks below PHYS_OFFSET 2012-10-18 20:14:00 +01:00
lib arm64: Miscellaneous library functions 2012-09-17 13:42:18 +01:00
mm arm64: Call swiotlb_init() instead of swiotlb_init_with_default_size() 2012-10-08 16:02:09 +01:00
Kconfig arm64: Select MODULES_USE_ELF_RELA 2012-10-18 20:11:54 +01:00
Kconfig.debug arm64: Build infrastructure 2012-09-17 13:42:21 +01:00
Makefile arm64: Build infrastructure 2012-09-17 13:42:21 +01:00