summaryrefslogtreecommitdiffstats
path: root/include/uapi
diff options
context:
space:
mode:
authorAKASHI Takahiro <takahiro.akashi@linaro.org>2014-03-15 06:48:00 +0100
committerEric Paris <eparis@redhat.com>2014-03-20 15:11:35 +0100
commit4b58841149dcaa500ceba1d5378ae70622fe4899 (patch)
tree0be5b9be6b140e6250a416acff517067fb6d5efd /include/uapi
parentaudit: Add CONFIG_HAVE_ARCH_AUDITSYSCALL (diff)
downloadlinux-4b58841149dcaa500ceba1d5378ae70622fe4899.tar.xz
linux-4b58841149dcaa500ceba1d5378ae70622fe4899.zip
audit: Add generic compat syscall support
lib/audit.c provides a generic function for auditing system calls. This patch extends it for compat syscall support on bi-architectures (32/64-bit) by adding lib/compat_audit.c. What is required to support this feature are: * add asm/unistd32.h for compat system call names * select CONFIG_AUDIT_ARCH_COMPAT_GENERIC Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Acked-by: Richard Guy Briggs <rgb@redhat.com> Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/linux/audit.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/uapi/linux/audit.h b/include/uapi/linux/audit.h
index 4315ee99b967..9af01d77dc44 100644
--- a/include/uapi/linux/audit.h
+++ b/include/uapi/linux/audit.h
@@ -362,6 +362,12 @@ enum {
#define AUDIT_ARCH_SPARC64 (EM_SPARCV9|__AUDIT_ARCH_64BIT)
#define AUDIT_ARCH_X86_64 (EM_X86_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
+#ifdef CONFIG_COMPAT
+#define audit_is_compat(arch) (!((arch) & __AUDIT_ARCH_64BIT))
+#else
+#define audit_is_compat(arch) false
+#endif
+
#define AUDIT_PERM_EXEC 1
#define AUDIT_PERM_WRITE 2
#define AUDIT_PERM_READ 4