[Devel] Re: [PATCH -mm 1/2] i386: semi-rewrite of PTRACE_PEEKUSR, PTRACE_POKEUSR
Andi Kleen
ak at suse.de
Wed Jun 20 08:53:33 PDT 2007
On Wednesday 20 June 2007 17:07:34 Alexey Dobriyan wrote:
> Refactor PTRACE_PEEKUSR, PTRACE_POKEUSR implementation on i386.
> Ideas and concepts borrowed from utrace patchset by Roland McGrath.
>
> Patch adds only two new concepts: struct ptrace_usr_area and struct regset.
> The former describes registers accessible through PTRACE_PEEKUSR,
> PTRACE_POKEUSR in generic way. Where it starts, where it ends, if it's a hole
> (needed to know when to return 0 and -EIO).
>
> The latter is for abstracting various registers and operations on them
> (general-purpose regs, FPU regs, etc).
>
> Unlike utrace patchset, usr_area has direct pointer to correspoding
> register set instead of magic number in specific array.
The new code seems to be larger than the old code. Not sure
how that is an improvement?
Given the old bit operations weren't very nice, but then
the code rarely changes so it wasn't exactly a maintenance issue.
-Andi
More information about the Devel
mailing list