aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAKASHI Takahiro <takahiro.akashi@linaro.org>2014-04-30 10:51:31 +0100
committerAlex Shi <alex.shi@linaro.org>2014-09-22 12:31:54 +0800
commitc5b2a660db70c8e591e8e2e3f7024073177b7124 (patch)
treec27dfe93a70666e256fabc02f85b83014103abb8
parent76e8de404a34bfff318da0b31e752db2642511f3 (diff)
downloadlinux-linaro-stable-v3.10/topic/android-fixes.tar.gz
arm64: Add regs_return_value() in syscall.hv3.10/topic/android-fixes
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> (cherry picked from commit d34a3ebd8d25cf691a94fae66a957a480cf46430) Signed-off-by: Alex Shi <alex.shi@linaro.org>
-rw-r--r--arch/arm64/include/asm/ptrace.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/ptrace.h b/arch/arm64/include/asm/ptrace.h
index 41a71ee..f38a8aa 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) \
((regs)->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)