diff options
author | AKASHI Takahiro <takahiro.akashi@linaro.org> | 2013-11-15 13:19:09 +0900 |
---|---|---|
committer | AKASHI Takahiro <takahiro.akashi@linaro.org> | 2014-05-07 11:46:49 +0900 |
commit | d7288d4d02eab3e9d5f1eea5aaf3fcb715fca30f (patch) | |
tree | 9e1dcf4b049f138e7c12eebad15293fcd3615318 | |
parent | c03f54443753a6a87368028dbef83944bef18a9b (diff) |
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>
-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) |