/* Note: if a user thread is execve'd from kernel space, the kernel stack will not be empty on entry to the kernel, so ptracing these tasks will fail.  */
static struct pt_regs* get_user_regs(struct task_struct *task)
/* Note: if a user thread is execve'd from kernel space, the kernel stack will not be empty on entry to the kernel, so ptracing these tasks will fail.  */
static struct pt_regs* get_user_regs(struct task_struct *task)
{
	return (struct pt_regs *)
	    ((unsigned long)task_stack_page(task) +
	     (THREAD_SIZE - sizeof(struct pt_regs)));
}