x86, ptrace: Simplify xstateregs_get()
authorSuresh Siddha <suresh.b.siddha@intel.com>
Mon, 22 Feb 2010 22:51:33 +0000 (14:51 -0800)
committerH. Peter Anvin <hpa@zytor.com>
Tue, 23 Feb 2010 21:45:27 +0000 (13:45 -0800)
commitff7fbc72e0c3ef7e94a27a3a918fd09ec9a30204
tree1e07cfb9d41d8c7c155ae781f901e287f3833273
parentc6a0dd7ec6fb2d4927979ed4dc562fc5c122d826
x86, ptrace: Simplify xstateregs_get()

48 bytes (bytes 464..511) of the xstateregs payload come from the
kernel defined structure (xstate_fx_sw_bytes). Rest comes from the
xstate regs structure in the thread struct. Instead of having multiple
user_regset_copyout()'s, simplify the xstateregs_get() by first
copying the SW bytes into the xstate regs structure in the thread structure
and then using one user_regset_copyout() to copyout the xstateregs.

Requested-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
LKML-Reference: <20100222225240.494688491@sbs-t61.sc.intel.com>
Acked-by: Roland McGrath <roland@redhat.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Oleg Nesterov <oleg@redhat.com>
arch/x86/kernel/i387.c