tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[PATCH 0/4] XSTATE core dump support and tests



Hi,

Here's a short patch set focused on adding PT_GETXSTATE note to core
dumps, and adding tests for register notes in core dumps.
For the former, I had to implement machdep interface for core dumps.
For the latter, I've decided to combine existing tests into a single
large function (alike functions used for other tests already),
to reduce code duplication.

The advantages of including PT_GETXSTATE in core dumps is that:

1. it includes YMM registers that are not present in any other state
   and is extensible to future register types,

2. it uses FXSAVE format on i386, filling missing support for XMM
   registers there (we could eventually implement PT_GETXMMREGS there
   but it would be redundant),

3. it provides state bitmasks, making it possible to determine which
   registers were supported by the CPU on which coredump was created.

The disadvantage is that it partially duplicates existing PT_GETFPREGS.
However, I don't think this is a major problem.

-- 
Best regards,
Michał Górny

Michał Górny (4):
  Include XSTATE note in x86 core dumps
  Fix alignment when reading core notes
  Combine x86 register tests into unified test function
  Add tests for reading registers from x86 core dumps.

 sys/arch/amd64/include/ptrace.h          |   12 +
 sys/arch/i386/include/ptrace.h           |   10 +
 sys/kern/core_elf32.c                    |    6 +-
 tests/lib/libc/sys/t_ptrace_amd64_wait.h |  406 +---
 tests/lib/libc/sys/t_ptrace_i386_wait.h  |  335 +--
 tests/lib/libc/sys/t_ptrace_wait.c       |    3 +
 tests/lib/libc/sys/t_ptrace_x86_wait.h   | 2508 ++++++++++------------
 7 files changed, 1226 insertions(+), 2054 deletions(-)

-- 
2.22.0



Home | Main Index | Thread Index | Old Index