projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/dtor/input
[powerpc.git]
/
arch
/
ia64
/
kernel
/
ptrace.c
diff --git
a/arch/ia64/kernel/ptrace.c
b/arch/ia64/kernel/ptrace.c
index
9887c87
..
3f89187
100644
(file)
--- a/
arch/ia64/kernel/ptrace.c
+++ b/
arch/ia64/kernel/ptrace.c
@@
-6,7
+6,6
@@
*
* Derived from the x86 and Alpha versions.
*/
*
* Derived from the x86 and Alpha versions.
*/
-#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/slab.h>
@@
-608,7
+607,7
@@
find_thread_for_addr (struct task_struct *child, unsigned long addr)
*/
list_for_each_safe(this, next, ¤t->children) {
p = list_entry(this, struct task_struct, sibling);
*/
list_for_each_safe(this, next, ¤t->children) {
p = list_entry(this, struct task_struct, sibling);
- if (p->
mm != mm
)
+ if (p->
tgid != child->tgid
)
continue;
if (thread_matches(p, addr)) {
child = p;
continue;
if (thread_matches(p, addr)) {
child = p;
@@
-1406,6
+1405,7
@@
ptrace_disable (struct task_struct *child)
struct ia64_psr *child_psr = ia64_psr(task_pt_regs(child));
/* make sure the single step/taken-branch trap bits are not set: */
struct ia64_psr *child_psr = ia64_psr(task_pt_regs(child));
/* make sure the single step/taken-branch trap bits are not set: */
+ clear_tsk_thread_flag(child, TIF_SINGLESTEP);
child_psr->ss = 0;
child_psr->tb = 0;
}
child_psr->ss = 0;
child_psr->tb = 0;
}
@@
-1526,6
+1526,7
@@
sys_ptrace (long request, pid_t pid, unsigned long addr, unsigned long data)
* Make sure the single step/taken-branch trap bits
* are not set:
*/
* Make sure the single step/taken-branch trap bits
* are not set:
*/
+ clear_tsk_thread_flag(child, TIF_SINGLESTEP);
ia64_psr(pt)->ss = 0;
ia64_psr(pt)->tb = 0;
ia64_psr(pt)->ss = 0;
ia64_psr(pt)->tb = 0;
@@
-1557,6
+1558,7
@@
sys_ptrace (long request, pid_t pid, unsigned long addr, unsigned long data)
goto out_tsk;
clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
goto out_tsk;
clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
+ set_tsk_thread_flag(child, TIF_SINGLESTEP);
if (request == PTRACE_SINGLESTEP) {
ia64_psr(pt)->ss = 1;
} else {
if (request == PTRACE_SINGLESTEP) {
ia64_psr(pt)->ss = 1;
} else {
@@
-1596,13
+1598,9
@@
sys_ptrace (long request, pid_t pid, unsigned long addr, unsigned long data)
}
}
-void
+
static
void
syscall_trace (void)
{
syscall_trace (void)
{
- if (!test_thread_flag(TIF_SYSCALL_TRACE))
- return;
- if (!(current->ptrace & PT_PTRACED))
- return;
/*
* 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.
@@
-1644,7
+1642,7
@@
syscall_trace_enter (long arg0, long arg1, long arg2, long arg3,
arch = AUDIT_ARCH_IA64;
}
arch = AUDIT_ARCH_IA64;
}
- audit_syscall_entry(
current,
arch, syscall, arg0, arg1, arg2, arg3);
+ audit_syscall_entry(arch, syscall, arg0, arg1, arg2, arg3);
}
}
}
}
@@
-1662,10
+1660,11
@@
syscall_trace_leave (long arg0, long arg1, long arg2, long arg3,
if (success != AUDITSC_SUCCESS)
result = -result;
if (success != AUDITSC_SUCCESS)
result = -result;
- audit_syscall_exit(
current,
success, result);
+ audit_syscall_exit(success, result);
}
}
- if (test_thread_flag(TIF_SYSCALL_TRACE)
+ if ((test_thread_flag(TIF_SYSCALL_TRACE)
+ || test_thread_flag(TIF_SINGLESTEP))
&& (current->ptrace & PT_PTRACED))
syscall_trace();
}
&& (current->ptrace & PT_PTRACED))
syscall_trace();
}