diff options
author | Jeff Dike <jdike@addtoit.com> | 2005-05-03 02:54:51 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@shinybook.infradead.org> | 2005-05-03 02:54:51 -0400 |
commit | 79d20b14a0d651f15b0ef9a22b6cf12d284a6d38 (patch) | |
tree | d0bc6bc1d47219ae9b8af608ce296fe02ffd7068 | |
parent | 54e0f520e7d94b865e0f5465db976dcc5ffe7190 (diff) |
[AUDIT] Update UML audit-syscall-{entry,exit} calls to new prototypes
This patch is for -mm only. It should probably be included in git-audit,
and should be forwarded to Linus iff git-audit is.
It updates the audit-syscall-{entry,exit} calls to current -mm.
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
-rw-r--r-- | arch/um/kernel/ptrace.c | 21 | ||||
-rw-r--r-- | include/asm-um/ptrace-i386.h | 2 | ||||
-rw-r--r-- | include/asm-um/ptrace-x86_64.h | 2 | ||||
-rw-r--r-- | include/asm-um/thread_info.h | 4 | ||||
-rw-r--r-- | init/Kconfig | 2 |
5 files changed, 20 insertions, 11 deletions
diff --git a/arch/um/kernel/ptrace.c b/arch/um/kernel/ptrace.c index 3a99ee6d94eb..7b259a22447e 100644 --- a/arch/um/kernel/ptrace.c +++ b/arch/um/kernel/ptrace.c | |||
@@ -337,15 +337,18 @@ void syscall_trace(union uml_pt_regs *regs, int entryexit) | |||
337 | 337 | ||
338 | if (unlikely(current->audit_context)) { | 338 | if (unlikely(current->audit_context)) { |
339 | if (!entryexit) | 339 | if (!entryexit) |
340 | audit_syscall_entry(current, | 340 | audit_syscall_entry(current, |
341 | UPT_SYSCALL_NR(®s->regs), | 341 | HOST_AUDIT_ARCH, |
342 | UPT_SYSCALL_ARG1(®s->regs), | 342 | UPT_SYSCALL_NR(regs), |
343 | UPT_SYSCALL_ARG2(®s->regs), | 343 | UPT_SYSCALL_ARG1(regs), |
344 | UPT_SYSCALL_ARG3(®s->regs), | 344 | UPT_SYSCALL_ARG2(regs), |
345 | UPT_SYSCALL_ARG4(®s->regs)); | 345 | UPT_SYSCALL_ARG3(regs), |
346 | else | 346 | UPT_SYSCALL_ARG4(regs)); |
347 | audit_syscall_exit(current, | 347 | else { |
348 | UPT_SYSCALL_RET(®s->regs)); | 348 | int res = UPT_SYSCALL_RET(regs); |
349 | audit_syscall_exit(current, AUDITSC_RESULT(res), | ||
350 | res); | ||
351 | } | ||
349 | } | 352 | } |
350 | 353 | ||
351 | /* Fake a debug trap */ | 354 | /* Fake a debug trap */ |
diff --git a/include/asm-um/ptrace-i386.h b/include/asm-um/ptrace-i386.h index 9e47590ec293..04222f35c43e 100644 --- a/include/asm-um/ptrace-i386.h +++ b/include/asm-um/ptrace-i386.h | |||
@@ -6,6 +6,8 @@ | |||
6 | #ifndef __UM_PTRACE_I386_H | 6 | #ifndef __UM_PTRACE_I386_H |
7 | #define __UM_PTRACE_I386_H | 7 | #define __UM_PTRACE_I386_H |
8 | 8 | ||
9 | #define HOST_AUDIT_ARCH AUDIT_ARCH_I386 | ||
10 | |||
9 | #include "sysdep/ptrace.h" | 11 | #include "sysdep/ptrace.h" |
10 | #include "asm/ptrace-generic.h" | 12 | #include "asm/ptrace-generic.h" |
11 | 13 | ||
diff --git a/include/asm-um/ptrace-x86_64.h b/include/asm-um/ptrace-x86_64.h index c34be39b78b2..be51219a8ffe 100644 --- a/include/asm-um/ptrace-x86_64.h +++ b/include/asm-um/ptrace-x86_64.h | |||
@@ -14,6 +14,8 @@ | |||
14 | #include "asm/ptrace-generic.h" | 14 | #include "asm/ptrace-generic.h" |
15 | #undef signal_fault | 15 | #undef signal_fault |
16 | 16 | ||
17 | #define HOST_AUDIT_ARCH AUDIT_ARCH_X86_64 | ||
18 | |||
17 | void signal_fault(struct pt_regs_subarch *regs, void *frame, char *where); | 19 | void signal_fault(struct pt_regs_subarch *regs, void *frame, char *where); |
18 | 20 | ||
19 | #define FS_BASE (21 * sizeof(unsigned long)) | 21 | #define FS_BASE (21 * sizeof(unsigned long)) |
diff --git a/include/asm-um/thread_info.h b/include/asm-um/thread_info.h index bffb577bc54e..a10ea155907e 100644 --- a/include/asm-um/thread_info.h +++ b/include/asm-um/thread_info.h | |||
@@ -72,12 +72,14 @@ static inline struct thread_info *current_thread_info(void) | |||
72 | */ | 72 | */ |
73 | #define TIF_RESTART_BLOCK 4 | 73 | #define TIF_RESTART_BLOCK 4 |
74 | #define TIF_MEMDIE 5 | 74 | #define TIF_MEMDIE 5 |
75 | #define TIF_SYSCALL_AUDIT 6 | ||
75 | 76 | ||
76 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) | 77 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) |
77 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) | 78 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) |
78 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) | 79 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) |
79 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) | 80 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) |
80 | #define _TIF_RESTART_BLOCK (1 << TIF_RESTART_BLOCK) | 81 | #define _TIF_MEMDIE (1 << TIF_MEMDIE) |
82 | #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) | ||
81 | 83 | ||
82 | #endif | 84 | #endif |
83 | 85 | ||
diff --git a/init/Kconfig b/init/Kconfig index abe2682a6ca6..338d82aeda67 100644 --- a/init/Kconfig +++ b/init/Kconfig | |||
@@ -173,7 +173,7 @@ config AUDIT | |||
173 | 173 | ||
174 | config AUDITSYSCALL | 174 | config AUDITSYSCALL |
175 | bool "Enable system-call auditing support" | 175 | bool "Enable system-call auditing support" |
176 | depends on AUDIT && (X86 || PPC64 || ARCH_S390 || IA64) | 176 | depends on AUDIT && (X86 || PPC64 || ARCH_S390 || IA64 || UML) |
177 | default y if SECURITY_SELINUX | 177 | default y if SECURITY_SELINUX |
178 | help | 178 | help |
179 | Enable low-overhead system-call auditing infrastructure that | 179 | Enable low-overhead system-call auditing infrastructure that |