14 #include <linux/kernel.h>
15 #include <linux/ptrace.h>
16 #include <linux/signal.h>
45 if (valid_user_regs(&newregs)) {
63 static int ptrace_read_user(
struct task_struct *tsk,
unsigned long off,
64 unsigned long __user *ret)
69 if (off <
sizeof(
struct pt_regs))
70 tmp = get_user_reg(tsk, off >> 2);
78 static int ptrace_write_user(
struct task_struct *tsk,
unsigned long off,
81 if (off >=
sizeof(
struct pt_regs))
84 return put_user_reg(tsk, off >> 2, val);
88 unsigned long addr,
unsigned long data)
91 unsigned long __user *datap = (
unsigned long __user *) data;
95 ret = ptrace_read_user(child, addr, datap);
99 ret = ptrace_write_user(child, addr, data);
129 regs->UCreg_ip = why;