diff options
author | David Abdurachmanov <david.abdurachmanov@gmail.com> | 2018-10-29 11:48:53 +0100 |
---|---|---|
committer | Palmer Dabbelt <palmer@sifive.com> | 2019-01-07 17:22:39 +0100 |
commit | efe75c494f57890900caf6c8a0667db35bfaf56a (patch) | |
tree | 874556a5b33b4203aba387f88d1b0e231d35be38 /arch/riscv/include/asm/syscall.h | |
parent | Linux 4.20 (diff) | |
download | linux-efe75c494f57890900caf6c8a0667db35bfaf56a.tar.xz linux-efe75c494f57890900caf6c8a0667db35bfaf56a.zip |
riscv: add audit support
On RISC-V (riscv) audit is supported through generic lib/audit.c.
The patch adds required arch specific definitions.
Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
Diffstat (limited to 'arch/riscv/include/asm/syscall.h')
-rw-r--r-- | arch/riscv/include/asm/syscall.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/riscv/include/asm/syscall.h b/arch/riscv/include/asm/syscall.h index 8d25f8904c00..bba3da6ef157 100644 --- a/arch/riscv/include/asm/syscall.h +++ b/arch/riscv/include/asm/syscall.h @@ -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(®s->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 */ |