git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vserver 1.9.3
[linux-2.6.git]
/
arch
/
um
/
kernel
/
ptrace.c
diff --git
a/arch/um/kernel/ptrace.c
b/arch/um/kernel/ptrace.c
index
c68c937
..
0005a9b
100644
(file)
--- a/
arch/um/kernel/ptrace.c
+++ b/
arch/um/kernel/ptrace.c
@@
-24,11
+24,6
@@
void ptrace_disable(struct task_struct *child)
{
}
{
}
-extern long do_mmap2(struct task_struct *task, unsigned long addr,
- unsigned long len, unsigned long prot,
- unsigned long flags, unsigned long fd,
- unsigned long pgoff);
-
int sys_ptrace(long request, long pid, long addr, long data)
{
struct task_struct *child;
int sys_ptrace(long request, long pid, long addr, long data)
{
struct task_struct *child;
@@
-58,6
+53,8
@@
int sys_ptrace(long request, long pid, long addr, long data)
read_unlock(&tasklist_lock);
if (!child)
goto out;
read_unlock(&tasklist_lock);
if (!child)
goto out;
+ if (!vx_check(vx_task_xid(child), VX_WATCH|VX_IDENT))
+ goto out_tsk;
ret = -EPERM;
if (pid == 1) /* you may not mess with init */
ret = -EPERM;
if (pid == 1) /* you may not mess with init */
@@
-292,7
+289,7
@@
int sys_ptrace(long request, long pid, long addr, long data)
}
#endif
default:
}
#endif
default:
- ret =
-EIO
;
+ ret =
ptrace_request(child, request, addr, data)
;
break;
}
out_tsk:
break;
}
out_tsk:
@@
-302,8
+299,17
@@
int sys_ptrace(long request, long pid, long addr, long data)
return ret;
}
return ret;
}
-void syscall_trace(
void
)
+void syscall_trace(
union uml_pt_regs *regs, int entryexit
)
{
{
+ if (unlikely(current->audit_context)) {
+ if (!entryexit)
+ audit_syscall_entry(current, regs->orig_eax,
+ regs->ebx, regs->ecx,
+ regs->edx, regs->esi);
+ else
+ audit_syscall_exit(current, regs->eax);
+ }
+
if (!test_thread_flag(TIF_SYSCALL_TRACE))
return;
if (!(current->ptrace & PT_PTRACED))
if (!test_thread_flag(TIF_SYSCALL_TRACE))
return;
if (!(current->ptrace & PT_PTRACED))
@@
-311,11
+317,8
@@
void syscall_trace(void)
/* the 0x80 provides a way for the tracing parent to distinguish
between a syscall stop and SIGTRAP delivery */
/* the 0x80 provides a way for the tracing parent to distinguish
between a syscall stop and SIGTRAP delivery */
- current->exit_code = SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD)
- ? 0x80 : 0);
- current->state = TASK_STOPPED;
- notify_parent(current, SIGCHLD);
- schedule();
+ ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD)
+ ? 0x80 : 0));
/*
* this isn't the same as continuing with a signal, but it will do
/*
* this isn't the same as continuing with a signal, but it will do