lkml.org 
[lkml]   [2010]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [patch] x86: ptrace and core-dump extensions for xstate
From
Date
On Fri, 2010-02-05 at 13:15 -0800, Roland McGrath wrote:
> > #define PTRACE_GETREGS(r) (((r) << 16) | PTRACE_GETREGS_CMD)
> >
> > ... or something like that?
>
> (You can't use that exact name, it's taken.) IMHO this is some spurious
> obfuscation that is not warranted by saving the two get_user calls in the
> kernel.

Also value of NT_PRXFPREG complicates things bit more

#define NT_PRXFPREG 0x46e62b7f /* copied from gdb5.1/include/elf/common.h */

In this context, we have to perhaps use bits 31 and 29 to represent this
generic ptrace interface and the corresponding GET/SET commands.

> (OTOH, my suggestion requires a whole extra 5 lines of code or so
> in compat_sys_ptrace because the indirection in the ABI is sensitive to
> userland word size.) But I don't feel strongly about the particulars of
> the ptrace API addition, just that it be generic to cover any regset and
> not be prone to implicit buffer-size miscommunications. I'll leave it to
> whatever Oleg wants to implement.

Ok. I will split the previous patch in to two patches and re-post it. I
can help Oleg with reviewing and testing the generic implementation
whenever it is ready.

thanks,
suresh



\
 
 \ /
  Last update: 2010-02-05 22:43    [W:0.065 / U:22.672 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site