Re: ptrace PTRACE_PEEKUSER behavior

From: Anoop
Date: Thu May 08 2008 - 02:51:22 EST



Quoting Roland McGrath <roland@xxxxxxxxxx>:

'struct user' is really a virtual structure layout, and never exists
anywhere as an actual struct. It's really just defining the argument
values that can be used in PEEKUSR/POKEUSR calls.

But the powerpc ptrace code returns the FPRs & FPSCR though they are not part of user struct.

CHECK_FULL_REGS(child->thread.regs);
if (index < PT_FPR0) {
tmp = ptrace_get_reg(child, (int) index);
} else { <=============
flush_fp_to_thread(child);
tmp = ((unsigned long *)child->thread.fpr)[index - PT_FPR0];
}
ret = put_user(tmp,(unsigned long __user *) data);

Does this mandate inclusion of floating point set in powerpc user struct?

Regards,
- Anoop

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/