1
0
Fork 0

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>
hifive-unleashed-5.1
AKASHI Takahiro 2014-04-30 10:51:31 +01:00 committed by Catalin Marinas
parent 3157858fef
commit d34a3ebd8d
1 changed files with 5 additions and 0 deletions

View File

@ -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)