HomeFreeBSD

Fixes for ptrace(PT_GETXSTATE_INFO) related to the padding in struct

Description

Fixes for ptrace(PT_GETXSTATE_INFO) related to the padding in struct
ptrace_xstate_info).

struct ptrace_xstate_info has 64bit member but ends up with 32bit
one. As result, on amd64 there is a 32bit padding at the end, but not
on i386.

We must clear the padding before doing the copyout. For compat32 case,
we must copyout the structure which does not have the padding at the
end. The later fixes 32bit gdb display of the YMM registers when
running on amd64 kernel.

Reported by: Vlad Tsyrklevich
Reviewed by: brooks (previous version)
Sponsored by: The FreeBSD Foundation
admbugs: 765
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D14794

Details

Provenance
kibAuthored on
Reviewer
brooks
Differential Revision
D14794: Handle padding in struct ptrace_xstate_info.
Parents
rS331373: Improve write locking in ip6_ctloutput() with macros.
Branches
Unknown
Tags
Unknown