summaryrefslogtreecommitdiff
path: root/arch/arm64/include/asm/syscall.h
diff options
context:
space:
mode:
authorAKASHI Takahiro <takahiro.akashi@linaro.org>2014-07-04 11:28:30 +0400
committerCatalin Marinas <catalin.marinas@arm.com>2014-07-10 14:06:00 +0400
commit875cbf3e4614cfdcc7f65033e25292aec80f09c0 (patch)
tree08fdfc968a42afb6b67ddd13fe8ede7a70dbe975 /arch/arm64/include/asm/syscall.h
parent5701ede884c2221e6ebbb54aec83dc433287bc50 (diff)
downloadlinux-875cbf3e4614cfdcc7f65033e25292aec80f09c0.tar.xz
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>
Diffstat (limited to 'arch/arm64/include/asm/syscall.h')
-rw-r--r--arch/arm64/include/asm/syscall.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/syscall.h b/arch/arm64/include/asm/syscall.h
index 383771eb0b87..709a574468f0 100644
--- a/arch/arm64/include/asm/syscall.h
+++ b/arch/arm64/include/asm/syscall.h
@@ -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(&regs->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 */