Fix a handful of audit-related issue
[sfrench/cifs-2.6.git] / arch / riscv / include / asm / syscall.h
index 8d25f8904c008314beaf790b190ec41fd987e8be..bba3da6ef1572f41db64e59ca203ae32b9139180 100644 (file)
@@ -18,6 +18,7 @@
 #ifndef _ASM_RISCV_SYSCALL_H
 #define _ASM_RISCV_SYSCALL_H
 
+#include <uapi/linux/audit.h>
 #include <linux/sched.h>
 #include <linux/err.h>
 
@@ -99,4 +100,13 @@ static inline void syscall_set_arguments(struct task_struct *task,
        memcpy(&regs->a1 + i * sizeof(regs->a1), args, n * sizeof(regs->a0));
 }
 
+static inline int syscall_get_arch(void)
+{
+#ifdef CONFIG_64BIT
+       return AUDIT_ARCH_RISCV64;
+#else
+       return AUDIT_ARCH_RISCV32;
+#endif
+}
+
 #endif /* _ASM_RISCV_SYSCALL_H */