linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] ARM: ptrace: migrate to regsets and enable VFP coredumps
@ 2011-04-04 16:43 Dave Martin
  2011-04-04 16:43 ` [PATCH v3 1/2] ARM: ELF: Define new core note type for VFP registers Dave Martin
  2011-04-04 16:43 ` [PATCH v3 2/2] ARM: ptrace: Migrate to regsets framework Dave Martin
  0 siblings, 2 replies; 5+ messages in thread
From: Dave Martin @ 2011-04-04 16:43 UTC (permalink / raw)
  To: linux-arm-kernel

The VFP register state is currently missing from coredumps.

Rather than adding extra arch-specific code to handle this,
migrating to use the regsets framework and implementing a regset
for the VFP registers allows this state to be dumped automatically,
as well as simplifying some aspects of the ptrace implementation.

Dumping of other extension state could also be built
straightforwardly on the same framework, though I don't attempt
to implement that here.

In principle, we should be able to enable the generic
PTRAGE_GETREGSET/PTRAGE_SETREGSET calls too, but strangely
these are #ifdef'd on CONFIG_HAVE_ARCH_TRACEHOOK (which we don't
currently have).  CORE_DUMP_USE_REGSET might be more appropriate.
I'll raise this question separately on lkml.

v2: Move the new note definition to the customary global
    include/linux/elf.h

v3: Explicitly ensure the size of the VFP state dump is 0x104
    bytes, instead just relying on sizeof(struct user_vfp) which
    is larger due to trailing padding.  This avoids transferring
    too much data in the net PTRACE_GET/SETVFPREGS calls, as well
    as matching the coredump contents to the old ptrace payload.

Dave Martin (2):
  ARM: ELF: Define new core note type for VFP registers
  ARM: ptrace: Migrate to regsets framework

 arch/arm/include/asm/elf.h    |    1 +
 arch/arm/include/asm/ptrace.h |    6 +
 arch/arm/kernel/ptrace.c      |  348 ++++++++++++++++++++++++++++-------------
 include/linux/elf.h           |    1 +
 4 files changed, 247 insertions(+), 109 deletions(-)

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-04-05  9:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-04 16:43 [PATCH v3 0/2] ARM: ptrace: migrate to regsets and enable VFP coredumps Dave Martin
2011-04-04 16:43 ` [PATCH v3 1/2] ARM: ELF: Define new core note type for VFP registers Dave Martin
2011-04-04 16:43 ` [PATCH v3 2/2] ARM: ptrace: Migrate to regsets framework Dave Martin
2011-04-04 18:51   ` Ulrich Weigand
2011-04-05  9:07     ` Dave Martin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).