diff options
author | AKASHI Takahiro <takahiro.akashi@linaro.org> | 2014-04-30 10:51:31 +0100 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-05-30 18:15:41 +0100 |
commit | 376758fe9eb42dae79cbdbdf80ff30b588024c31 (patch) | |
tree | 83d1092434940e85c26a9a3132ea2320fcd80094 | |
parent | 517f60a12daa74220479363dab0f098f22fd9e27 (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>
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: Mark Brown <broonie@linaro.org>
-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 41a71ee4c3df..f38a8aa58d4c 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) |