[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>
This commit is contained in:
parent
54e0f520e7
commit
79d20b14a0
5 changed files with 20 additions and 11 deletions
|
@ -337,15 +337,18 @@ void syscall_trace(union uml_pt_regs *regs, int entryexit)
|
||||||
|
|
||||||
if (unlikely(current->audit_context)) {
|
if (unlikely(current->audit_context)) {
|
||||||
if (!entryexit)
|
if (!entryexit)
|
||||||
audit_syscall_entry(current,
|
audit_syscall_entry(current,
|
||||||
UPT_SYSCALL_NR(®s->regs),
|
HOST_AUDIT_ARCH,
|
||||||
UPT_SYSCALL_ARG1(®s->regs),
|
UPT_SYSCALL_NR(regs),
|
||||||
UPT_SYSCALL_ARG2(®s->regs),
|
UPT_SYSCALL_ARG1(regs),
|
||||||
UPT_SYSCALL_ARG3(®s->regs),
|
UPT_SYSCALL_ARG2(regs),
|
||||||
UPT_SYSCALL_ARG4(®s->regs));
|
UPT_SYSCALL_ARG3(regs),
|
||||||
else
|
UPT_SYSCALL_ARG4(regs));
|
||||||
audit_syscall_exit(current,
|
else {
|
||||||
UPT_SYSCALL_RET(®s->regs));
|
int res = UPT_SYSCALL_RET(regs);
|
||||||
|
audit_syscall_exit(current, AUDITSC_RESULT(res),
|
||||||
|
res);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Fake a debug trap */
|
/* Fake a debug trap */
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
#ifndef __UM_PTRACE_I386_H
|
#ifndef __UM_PTRACE_I386_H
|
||||||
#define __UM_PTRACE_I386_H
|
#define __UM_PTRACE_I386_H
|
||||||
|
|
||||||
|
#define HOST_AUDIT_ARCH AUDIT_ARCH_I386
|
||||||
|
|
||||||
#include "sysdep/ptrace.h"
|
#include "sysdep/ptrace.h"
|
||||||
#include "asm/ptrace-generic.h"
|
#include "asm/ptrace-generic.h"
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
#include "asm/ptrace-generic.h"
|
#include "asm/ptrace-generic.h"
|
||||||
#undef signal_fault
|
#undef signal_fault
|
||||||
|
|
||||||
|
#define HOST_AUDIT_ARCH AUDIT_ARCH_X86_64
|
||||||
|
|
||||||
void signal_fault(struct pt_regs_subarch *regs, void *frame, char *where);
|
void signal_fault(struct pt_regs_subarch *regs, void *frame, char *where);
|
||||||
|
|
||||||
#define FS_BASE (21 * sizeof(unsigned long))
|
#define FS_BASE (21 * sizeof(unsigned long))
|
||||||
|
|
|
@ -72,12 +72,14 @@ static inline struct thread_info *current_thread_info(void)
|
||||||
*/
|
*/
|
||||||
#define TIF_RESTART_BLOCK 4
|
#define TIF_RESTART_BLOCK 4
|
||||||
#define TIF_MEMDIE 5
|
#define TIF_MEMDIE 5
|
||||||
|
#define TIF_SYSCALL_AUDIT 6
|
||||||
|
|
||||||
#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
|
#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
|
||||||
#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
|
#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
|
||||||
#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
|
#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
|
||||||
#define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG)
|
#define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG)
|
||||||
#define _TIF_RESTART_BLOCK (1 << TIF_RESTART_BLOCK)
|
#define _TIF_MEMDIE (1 << TIF_MEMDIE)
|
||||||
|
#define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -173,7 +173,7 @@ config AUDIT
|
||||||
|
|
||||||
config AUDITSYSCALL
|
config AUDITSYSCALL
|
||||||
bool "Enable system-call auditing support"
|
bool "Enable system-call auditing support"
|
||||||
depends on AUDIT && (X86 || PPC64 || ARCH_S390 || IA64)
|
depends on AUDIT && (X86 || PPC64 || ARCH_S390 || IA64 || UML)
|
||||||
default y if SECURITY_SELINUX
|
default y if SECURITY_SELINUX
|
||||||
help
|
help
|
||||||
Enable low-overhead system-call auditing infrastructure that
|
Enable low-overhead system-call auditing infrastructure that
|
||||||
|
|
Loading…
Reference in a new issue