Thread (34 messages) 34 messages, 6 authors, 2011-07-08

Re: [PATCH v2 06/19] OpenRISC: PTrace

From: Arnd Bergmann <arnd@arndb.de>
Date: 2011-07-05 16:42:19
Also in: lkml

On Tuesday 05 July 2011, Jonas Bonn wrote:
I've been looking a bit at the ptrace stuff the last couple of days.
One question that occurred to me was:  is it mandatory to export the
"struct pt_regs" info in ptrace.h to userspace?
I don't know, it certainly has been the case traditionally, but as
far as I can tell, this was mainly used by ancient gdb ports,
while newer versions just hardcode the offsets for PTRACE_PEEKUSR.
I'm not sure I like the layout of our struct pt_regs.  It would be
better to lay out the registers in a way that mirrors the order that
they are saved during exception/syscall entry in order to make better
use of the cache.

Since the registers can be exported via a regset to userspace anyway
(which doesn't necessarily need to look like pt_regs), I don't see that
userspace really needs how we lay out the registers on the stack.  By
not exporting pt_regs, I am free to change the layout... if it's
exported, it becomes ABI.
Yes. I think you can just change your ptrace code to not export
pt_regs through PEEKUSR but only through elf_gregset_t, which
you can define independently.

	Arnd
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help