diff options
author | AKASHI Takahiro <takahiro.akashi@linaro.org> | 2014-04-30 13:51:31 +0400 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2014-05-12 19:43:29 +0400 |
commit | d34a3ebd8d25cf691a94fae66a957a480cf46430 (patch) | |
tree | f55a7b0406fcdb21acddfc572fdf4ed7675dcaa2 /arch/arm64/include | |
parent | 3157858feff89196635b01495d5ec9ebe206639e (diff) | |
download | linux-d34a3ebd8d25cf691a94fae66a957a480cf46430.tar.xz |
arm64: Add regs_return_value() in syscall.h
This macro, regs_return_value, is used mainly for audit to record system
call's results, but may also be used in test_kprobes.c.
Acked-by: Will Deacon <will.deacon@arm.com>
Acked-by: Richard Guy Briggs <rgb@redhat.com>
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/include')
-rw-r--r-- | arch/arm64/include/asm/ptrace.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/ptrace.h b/arch/arm64/include/asm/ptrace.h index c7ba261dd4b3..a429b5940be2 100644 --- a/arch/arm64/include/asm/ptrace.h +++ b/arch/arm64/include/asm/ptrace.h @@ -135,6 +135,11 @@ struct pt_regs { #define user_stack_pointer(regs) \ (!compat_user_mode(regs)) ? ((regs)->sp) : ((regs)->compat_sp) +static inline unsigned long regs_return_value(struct pt_regs *regs) +{ + return regs->regs[0]; +} + /* * Are the current registers suitable for user mode? (used to maintain * security in signal handlers) |