arm64: Add audit support
On AArch64, audit is supported through generic lib/audit.c and compat_audit.c, and so this patch adds arch specific definitions required. 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: Catalin Marinas <catalin.marinas@arm.com>
This commit is contained in:

committed by
Catalin Marinas

parent
5701ede884
commit
875cbf3e46
@@ -16,6 +16,8 @@
|
||||
#ifndef __ASM_SYSCALL_H
|
||||
#define __ASM_SYSCALL_H
|
||||
|
||||
#include <uapi/linux/audit.h>
|
||||
#include <linux/compat.h>
|
||||
#include <linux/err.h>
|
||||
|
||||
extern const void *sys_call_table[];
|
||||
@@ -105,4 +107,16 @@ static inline void syscall_set_arguments(struct task_struct *task,
|
||||
memcpy(®s->regs[i], args, n * sizeof(args[0]));
|
||||
}
|
||||
|
||||
/*
|
||||
* We don't care about endianness (__AUDIT_ARCH_LE bit) here because
|
||||
* AArch64 has the same system calls both on little- and big- endian.
|
||||
*/
|
||||
static inline int syscall_get_arch(void)
|
||||
{
|
||||
if (is_compat_task())
|
||||
return AUDIT_ARCH_ARM;
|
||||
|
||||
return AUDIT_ARCH_AARCH64;
|
||||
}
|
||||
|
||||
#endif /* __ASM_SYSCALL_H */
|
||||
|
Reference in New Issue
Block a user