summaryrefslogtreecommitdiffstats
path: root/linux-2.6-utrace-ptrace.patch
diff options
context:
space:
mode:
authorKyle McMartin <kyle@mcmartin.ca>2010-11-08 10:38:33 -0500
committerKyle McMartin <kyle@mcmartin.ca>2010-11-08 10:38:33 -0500
commit1aea2328b45aa547a36a8db2b75032727c1672a7 (patch)
treeec6ec0a992fe8d9b6e126689c4fe5315e629d342 /linux-2.6-utrace-ptrace.patch
parent7b2f649ec2da6640878c15298f5d3f8451dd8125 (diff)
downloadkernel-1aea2328b45aa547a36a8db2b75032727c1672a7.tar.gz
kernel-1aea2328b45aa547a36a8db2b75032727c1672a7.tar.xz
kernel-1aea2328b45aa547a36a8db2b75032727c1672a7.zip
Cherry-pick utrace-ptrace fixes from mayoung. Thanks!
Diffstat (limited to 'linux-2.6-utrace-ptrace.patch')
-rw-r--r--linux-2.6-utrace-ptrace.patch35
1 files changed, 19 insertions, 16 deletions
diff --git a/linux-2.6-utrace-ptrace.patch b/linux-2.6-utrace-ptrace.patch
index a609fb628..caeae6760 100644
--- a/linux-2.6-utrace-ptrace.patch
+++ b/linux-2.6-utrace-ptrace.patch
@@ -29,9 +29,9 @@ index a85fb41..235c1b0 100644
-
+extern void ptrace_notify_stop(struct task_struct *tracee);
- extern long arch_ptrace(struct task_struct *child, long request, long addr, long data);
+ extern long arch_ptrace(struct task_struct *child, long request,
+ unsigned long addr, unsigned long data);
extern int ptrace_traceme(void);
- extern int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst, int len);
diff --git a/kernel/Makefile b/kernel/Makefile
index 6004913..b09c9a5 100644
--- a/kernel/Makefile
@@ -673,7 +673,7 @@ index ...a90078d 100644
+ * under ptrace.
+ */
+ retval = -ERESTARTNOINTR;
-+ if (mutex_lock_interruptible(&task->cred_guard_mutex))
++ if (mutex_lock_interruptible(&task->signal->cred_guard_mutex))
+ goto out;
+
+ task_lock(task);
@@ -703,7 +703,7 @@ index ...a90078d 100644
+unlock_tasklist:
+ write_unlock_irq(&tasklist_lock);
+unlock_creds:
-+ mutex_unlock(&task->cred_guard_mutex);
++ mutex_unlock(&task->signal->cred_guard_mutex);
+out:
+ return retval;
+}
@@ -1014,7 +1014,7 @@ index ...a90078d 100644
+ struct iovec *kiov);
+
+int ptrace_request(struct task_struct *child, long request,
-+ long addr, long data)
++ unsigned long addr, unsigned long data)
+{
+ struct utrace_engine *engine = ptrace_lookup_engine(child);
+ siginfo_t siginfo;
@@ -1412,7 +1412,7 @@ index 23bde94..daed9e8 100644
+#define arch_ptrace_attach(child) do { } while (0)
+#endif
+
-+SYSCALL_DEFINE4(ptrace, long, request, long, pid, long, addr, long, data)
++SYSCALL_DEFINE4(ptrace, long, request, long, pid, unsigned long, addr, unsigned long, data)
+{
+ struct task_struct *child;
+ long ret;
@@ -1453,7 +1453,7 @@ index 23bde94..daed9e8 100644
+ return ret;
+}
+
-+int generic_ptrace_peekdata(struct task_struct *tsk, long addr, long data)
++int generic_ptrace_peekdata(struct task_struct *tsk, unsigned long addr, unsigned long data)
+{
+ unsigned long tmp;
+ int copied;
@@ -1464,7 +1464,7 @@ index 23bde94..daed9e8 100644
+ return put_user(tmp, (unsigned long __user *)data);
+}
+
-+int generic_ptrace_pokedata(struct task_struct *tsk, long addr, long data)
++int generic_ptrace_pokedata(struct task_struct *tsk, unsigned long addr, unsigned long data)
+{
+ int copied;
+
@@ -1595,7 +1595,7 @@ index 23bde94..daed9e8 100644
unlock_tasklist:
- write_unlock_irq(&tasklist_lock);
-unlock_creds:
-- mutex_unlock(&task->cred_guard_mutex);
+- mutex_unlock(&task->signal->cred_guard_mutex);
-out:
- return retval;
-}
@@ -1656,7 +1656,7 @@ index 23bde94..daed9e8 100644
- * If it should reap itself, return true.
+ write_unlock_irq(&tasklist_lock);
+unlock_creds:
-+ mutex_unlock(&task->cred_guard_mutex);
++ mutex_unlock(&task->signal->cred_guard_mutex);
+out:
+ return retval;
+}
@@ -1765,7 +1765,7 @@ index 23bde94..daed9e8 100644
- return copied;
-}
-
- static int ptrace_setoptions(struct task_struct *child, long data)
+ static int ptrace_setoptions(struct task_struct *child, unsigned long data)
{
child->ptrace &= ~PT_TRACE_MASK;
@@ -530,47 +677,6 @@ static int ptrace_resume(struct task_str
@@ -1814,9 +1814,9 @@ index 23bde94..daed9e8 100644
-#endif
-
int ptrace_request(struct task_struct *child, long request,
- long addr, long data)
+ unsigned long addr, unsigned long data)
{
-@@ -686,88 +792,7 @@ int ptrace_request(struct task_struct *c
+@@ -686,91 +792,7 @@ int ptrace_request(struct task_struct *c
return ret;
}
@@ -1839,7 +1839,8 @@ index 23bde94..daed9e8 100644
-#define arch_ptrace_attach(child) do { } while (0)
-#endif
-
--SYSCALL_DEFINE4(ptrace, long, request, long, pid, long, addr, long, data)
+-SYSCALL_DEFINE4(ptrace, long, request, long, pid, unsigned long, addr,
+- unsigned long, data)
-{
- struct task_struct *child;
- long ret;
@@ -1880,7 +1881,8 @@ index 23bde94..daed9e8 100644
- return ret;
-}
-
--int generic_ptrace_peekdata(struct task_struct *tsk, long addr, long data)
+-int generic_ptrace_peekdata(struct task_struct *tsk, unsigned long addr,
+- unsigned long data)
-{
- unsigned long tmp;
- int copied;
@@ -1891,7 +1893,8 @@ index 23bde94..daed9e8 100644
- return put_user(tmp, (unsigned long __user *)data);
-}
-
--int generic_ptrace_pokedata(struct task_struct *tsk, long addr, long data)
+-int generic_ptrace_pokedata(struct task_struct *tsk, unsigned long addr,
+- unsigned long data)
-{
- int copied;
-