diff mbox series

alpha: Add syscall_get_return_value()

Message ID 20210426091629.45020-1-zhe.he@windriver.com (mailing list archive)
State New
Headers show
Series alpha: Add syscall_get_return_value() | expand

Commit Message

He Zhe April 26, 2021, 9:16 a.m. UTC
audit now reuquires syscall_get_return_value instead of regs_return_value
to retrieve syscall return code . Other architectures that support audit
have already define this function.

Signed-off-by: He Zhe <zhe.he@windriver.com>
---
 arch/alpha/include/asm/syscall.h | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

He Zhe April 26, 2021, 9:21 a.m. UTC | #1
This is depended by https://lore.kernel.org/lkml/20210423103533.30121-3-zhe.he@windriver.com/

Thanks,
Zhe

On 4/26/21 5:16 PM, He Zhe wrote:
> audit now reuquires syscall_get_return_value instead of regs_return_value
> to retrieve syscall return code . Other architectures that support audit
> have already define this function.
>
> Signed-off-by: He Zhe <zhe.he@windriver.com>
> ---
>  arch/alpha/include/asm/syscall.h | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/arch/alpha/include/asm/syscall.h b/arch/alpha/include/asm/syscall.h
> index 11c688c1d7ec..f21babaeed85 100644
> --- a/arch/alpha/include/asm/syscall.h
> +++ b/arch/alpha/include/asm/syscall.h
> @@ -9,4 +9,10 @@ static inline int syscall_get_arch(struct task_struct *task)
>  	return AUDIT_ARCH_ALPHA;
>  }
>  
> +static inline long syscall_get_return_value(struct task_struct *task,
> +					    struct pt_regs *regs)
> +{
> +	return regs->r0;
> +}
> +
>  #endif	/* _ASM_ALPHA_SYSCALL_H */

--
Linux-audit mailing list
Linux-audit@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-audit
diff mbox series

Patch

diff --git a/arch/alpha/include/asm/syscall.h b/arch/alpha/include/asm/syscall.h
index 11c688c1d7ec..f21babaeed85 100644
--- a/arch/alpha/include/asm/syscall.h
+++ b/arch/alpha/include/asm/syscall.h
@@ -9,4 +9,10 @@  static inline int syscall_get_arch(struct task_struct *task)
 	return AUDIT_ARCH_ALPHA;
 }
 
+static inline long syscall_get_return_value(struct task_struct *task,
+					    struct pt_regs *regs)
+{
+	return regs->r0;
+}
+
 #endif	/* _ASM_ALPHA_SYSCALL_H */