lkml.org 
[lkml]   [2016]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 08/10] x86/xsaves: Fix PTRACE frames for XSAVES
On Mon, Feb 22, 2016 at 02:45:54PM -0800, Andy Lutomirski wrote:
> > +/*
> > + * Convert from kernel XSAVES compacted format to standard format and copy
> > + * to a ptrace buffer. It supports partial copy but pos always starts from
> > + * zero. This is called from xstateregs_get() and there we check the cpu
> > + * has XSAVES.
> > + */
> > +int copyout_from_xsaves(unsigned int pos, unsigned int count, void *kbuf,
> > + void __user *ubuf, const struct xregs_state *xsave)
>
> Now that you've written this code, can it be shared with the signal
> handling code?
>

For signal handling, we most likely save registers directly to memory.
But for ptrace, the thread being debugged is not the active thread.
Please let me think about it more.

--Yu-cheng


\
 
 \ /
  Last update: 2016-02-23 00:41    [W:0.063 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site