Commit e75ea3bb authored by Paolo \'Blaisorblade\' Giarrusso's avatar Paolo \'Blaisorblade\' Giarrusso Committed by Linus Torvalds

[PATCH] uml: fix syscall auditing

Correct the entry_exit parameter for syscall_trace when tracing syscalls.  It
was the reverse of the needed value.  (i.e.  it was 1 on entry and 0 on exit).
Signed-off-by: default avatarPaolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 960b6b4e
...@@ -22,7 +22,7 @@ void handle_syscall(union uml_pt_regs *regs) ...@@ -22,7 +22,7 @@ void handle_syscall(union uml_pt_regs *regs)
index = record_syscall_start(UPT_SYSCALL_NR(regs)); index = record_syscall_start(UPT_SYSCALL_NR(regs));
syscall_trace(regs, 1); syscall_trace(regs, 0);
result = execute_syscall(regs); result = execute_syscall(regs);
REGS_SET_SYSCALL_RETURN(regs->skas.regs, result); REGS_SET_SYSCALL_RETURN(regs->skas.regs, result);
...@@ -30,7 +30,7 @@ void handle_syscall(union uml_pt_regs *regs) ...@@ -30,7 +30,7 @@ void handle_syscall(union uml_pt_regs *regs)
(result == -ERESTARTNOINTR)) (result == -ERESTARTNOINTR))
do_signal(result); do_signal(result);
syscall_trace(regs, 0); syscall_trace(regs, 1);
record_syscall_end(index, result); record_syscall_end(index, result);
} }
......
...@@ -33,7 +33,7 @@ void syscall_handler_tt(int sig, union uml_pt_regs *regs) ...@@ -33,7 +33,7 @@ void syscall_handler_tt(int sig, union uml_pt_regs *regs)
SC_START_SYSCALL(sc); SC_START_SYSCALL(sc);
index = record_syscall_start(syscall); index = record_syscall_start(syscall);
syscall_trace(regs, 1); syscall_trace(regs, 0);
result = execute_syscall(regs); result = execute_syscall(regs);
/* regs->sc may have changed while the system call ran (there may /* regs->sc may have changed while the system call ran (there may
...@@ -46,7 +46,7 @@ void syscall_handler_tt(int sig, union uml_pt_regs *regs) ...@@ -46,7 +46,7 @@ void syscall_handler_tt(int sig, union uml_pt_regs *regs)
(result == -ERESTARTNOINTR)) (result == -ERESTARTNOINTR))
do_signal(result); do_signal(result);
syscall_trace(regs, 0); syscall_trace(regs, 1);
record_syscall_end(index, result); record_syscall_end(index, result);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment