On Sat, Apr 26, 2008 at 05:35:38PM +0800, WANG Cong wrote: > From: Jeff Dike <[EMAIL PROTECTED]> > Date: Fri, 25 Apr 2008 13:56:10 -0400 > > Tidy the ptrace interface code. Removed a bunch of unused macros. > > Started converting register sets from arrays of longs to structures. > > Could you please explain a bit why do this? I think long arrary is OK.
It's wrong on x86_64. There, FRAME_SIZE is 168 - #define FRAME_SIZE and SS is the last register defined - #define SS 160 but there are a number of registers beyond that in the user_regs_struct: unsigned long ss; unsigned long fs_base; unsigned long gs_base; unsigned long ds; unsigned long es; unsigned long fs; unsigned long gs; The effect of GETREGS into a long[FRAME_SIZE] will be stack corruption. Jeff -- Work email - jdike at linux dot intel dot com ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel