@@ -7,7 +7,7 @@
#ifndef _ASM_ARM_SYSCALL_H
#define _ASM_ARM_SYSCALL_H
-#include <linux/audit.h> /* for AUDIT_ARCH_* */
+#include <uapi/linux/audit.h> /* for AUDIT_ARCH_* */
#include <linux/elf.h> /* for ELF_EM */
#include <linux/err.h>
#include <linux/sched.h>
@@ -15,7 +15,7 @@
#include <linux/sched.h>
#include <linux/err.h>
-#include <linux/audit.h>
+#include <uapi/linux/audit.h>
static inline long syscall_get_nr(struct task_struct *task,
struct pt_regs *regs)
@@ -3,7 +3,7 @@
#include <linux/kernel.h>
#include <linux/sched.h>
-#include <linux/audit.h>
+#include <uapi/linux/audit.h>
#include <asm/ptrace.h>
/* The system call number is given by the user in R12 */
@@ -13,7 +13,7 @@
#ifndef __ASM_MIPS_SYSCALL_H
#define __ASM_MIPS_SYSCALL_H
-#include <linux/audit.h>
+#include <uapi/linux/audit.h>
#include <linux/elf-em.h>
#include <linux/kernel.h>
#include <linux/sched.h>
@@ -21,7 +21,7 @@
#include <linux/err.h>
#include <linux/sched.h>
-#include <linux/audit.h>
+#include <uapi/linux/audit.h>
static inline int
syscall_get_nr(struct task_struct *task, struct pt_regs *regs)
@@ -5,7 +5,7 @@
#include <linux/err.h>
#include <linux/compat.h>
-#include <linux/audit.h>
+#include <uapi/linux/audit.h>
#include <asm/ptrace.h>
static inline long syscall_get_nr(struct task_struct *tsk,
@@ -15,7 +15,7 @@
#include <linux/sched.h>
#include <linux/compat.h>
-#include <linux/audit.h>
+#include <uapi/linux/audit.h>
/* ftrace syscalls requires exporting the sys_call_table */
#ifdef CONFIG_FTRACE_SYSCALLS
@@ -12,7 +12,7 @@
#ifndef _ASM_SYSCALL_H
#define _ASM_SYSCALL_H 1
-#include <linux/audit.h>
+#include <uapi/linux/audit.h>
#include <linux/sched.h>
#include <linux/err.h>
#include <asm/ptrace.h>
@@ -9,7 +9,7 @@ extern const unsigned long sys_call_table[];
# include <asm/syscall_64.h>
#endif
-# include <linux/audit.h>
+# include <uapi/linux/audit.h>
static inline int syscall_get_arch(struct task_struct *tsk,
struct pt_regs *regs)
@@ -3,7 +3,7 @@
#include <linux/kernel.h>
#include <linux/sched.h>
-#include <linux/audit.h>
+#include <uapi/linux/audit.h>
#include <asm/ptrace.h>
/*
@@ -13,7 +13,7 @@
#ifndef _ASM_X86_SYSCALL_H
#define _ASM_X86_SYSCALL_H
-#include <linux/audit.h>
+#include <uapi/linux/audit.h>
#include <linux/sched.h>
#include <linux/err.h>
#include <asm/asm-offsets.h> /* For NR_syscalls */
@@ -1461,7 +1461,7 @@ void __audit_syscall_entry(int arch, int major,
if (!audit_enabled)
return;
- context->arch = arch;
+ context->arch = syscall_get_arch(current, NULL);
context->major = major;
context->argv[0] = a1;
context->argv[1] = a2;
Since all the callers of syscall_get_arch() presently pass "current" and none of the arch-specific syscall_get_arch() implementations use the regs parameter, ignore the passed in arch parameter to __audit_syscall_entry() and call syscall_get_arch() directly. Change the audit header file from the kernel internal to the user api version to get the architecture numbers, but to avoid a circular header reference between audit and syscall.h Signed-off-by: Richard Guy Briggs <rgb@redhat.com> --- arch/arm/include/asm/syscall.h | 2 +- arch/ia64/include/asm/syscall.h | 2 +- arch/microblaze/include/asm/syscall.h | 2 +- arch/mips/include/asm/syscall.h | 2 +- arch/openrisc/include/asm/syscall.h | 2 +- arch/parisc/include/asm/syscall.h | 2 +- arch/powerpc/include/asm/syscall.h | 2 +- arch/s390/include/asm/syscall.h | 2 +- arch/sh/include/asm/syscall.h | 2 +- arch/sparc/include/asm/syscall.h | 2 +- arch/x86/include/asm/syscall.h | 2 +- kernel/auditsc.c | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-)