OSDN Git Service

arm64: remove sigreturn wrappers
authorMark Rutland <mark.rutland@arm.com>
Wed, 11 Jul 2018 13:56:41 +0000 (14:56 +0100)
committerWill Deacon <will.deacon@arm.com>
Thu, 12 Jul 2018 13:40:39 +0000 (14:40 +0100)
commit3085e1645e23888125224f66a710077cdb03106a
treea0aa48b29c26aa10c8d7e07fb0a5da7edac7b28b
parentf9209e26293300db80a57a6bf2f71ccb26ad45db
arm64: remove sigreturn wrappers

The arm64 sigreturn* syscall handlers are non-standard. Rather than
taking a number of user parameters in registers as per the AAPCS,
they expect the pt_regs as their sole argument.

To make this work, we override the syscall definitions to invoke
wrappers written in assembly, which mov the SP into x0, and branch to
their respective C functions.

On other architectures (such as x86), the sigreturn* functions take no
argument and instead use current_pt_regs() to acquire the user
registers. This requires less boilerplate code, and allows for other
features such as interposing C code in this path.

This patch takes the same approach for arm64.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Tentatively-reviewed-by: Dave Martin <dave.martin@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/include/asm/unistd32.h
arch/arm64/kernel/entry.S
arch/arm64/kernel/entry32.S
arch/arm64/kernel/signal.c
arch/arm64/kernel/signal32.c
arch/arm64/kernel/sys.c
arch/arm64/kernel/sys32.c