tech-kern archive

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

[PATCH 0/2] PT_{GET,SET}XSTATE implementation, WIP v1



Hi,

Here's my first complete version of PT_GETXSTATE/PT_SETXSTATE impl.
It's still WIP but it's functionally complete for XSAVE systems,
and it works correctly on i386 and amd64.

It follows variant b from [1], simply because my previous work was
easier to convert to this variant.  If you really believe we should
be going for variant c instead, I can update the proposal but I honestly
see no gain from multiplicating ptrace requests over necessity.

Patches sent as replies (git format).  More info in patch bodies.

[1] http://mail-index.netbsd.org/tech-kern/2019/05/28/msg025062.html

--
Best regards,
Michał Górny


Michał Górny (2):
  Fetch XSAVE area component offsets and sizes when initializing x86 CPU
  Implement PT_GETXSTATE and PT_SETXSTATE

 sys/arch/amd64/amd64/process_machdep.c    | 137 +++++++
 sys/arch/amd64/include/ptrace.h           |  27 +-
 sys/arch/i386/i386/process_machdep.c      |  97 +++++
 sys/arch/i386/include/ptrace.h            |  13 +-
 sys/arch/x86/include/cpu.h                |   2 +
 sys/arch/x86/include/cpu_extended_state.h |  52 +++
 sys/arch/x86/include/fpu.h                |   4 +
 sys/arch/x86/include/specialreg.h         |  20 +
 sys/arch/x86/x86/fpu.c                    | 120 ++++++
 sys/arch/x86/x86/identcpu.c               |  12 +
 tests/lib/libc/sys/t_ptrace_wait.c        |   2 +
 tests/lib/libc/sys/t_ptrace_x86_wait.h    | 448 +++++++++++++++++++++-
 12 files changed, 929 insertions(+), 5 deletions(-)

-- 
2.22.0.rc2



Home | Main Index | Thread Index | Old Index