aboutsummaryrefslogtreecommitdiff
path: root/kernel/ptrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/ptrace.c')
-rw-r--r--kernel/ptrace.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/ptrace.c b/kernel/ptrace.c
index 1653d35419a..4a1745f1dad 100644
--- a/kernel/ptrace.c
+++ b/kernel/ptrace.c
@@ -501,3 +501,11 @@ int generic_ptrace_peekdata(struct task_struct *tsk, long addr, long data)
return -EIO;
return put_user(tmp, (unsigned long __user *)data);
}
+
+int generic_ptrace_pokedata(struct task_struct *tsk, long addr, long data)
+{
+ int copied;
+
+ copied = access_process_vm(tsk, addr, &data, sizeof(data), 1);
+ return (copied == sizeof(data)) ? 0 : -EIO;
+}