From: AKASHI Takahiro Date: Wed, 30 Apr 2014 09:51:31 +0000 (+0100) Subject: arm64: Add regs_return_value() in syscall.h X-Git-Tag: firefly_0821_release~4090^2~194 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4b3735631fcc1056af00e382833727342f12c259;p=firefly-linux-kernel-4.4.55.git 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 Acked-by: Richard Guy Briggs Signed-off-by: AKASHI Takahiro Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas --- diff --git a/arch/arm64/include/asm/ptrace.h b/arch/arm64/include/asm/ptrace.h index fff28950e660..dbe3b00d1eb7 100644 --- a/arch/arm64/include/asm/ptrace.h +++ b/arch/arm64/include/asm/ptrace.h @@ -133,6 +133,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)