login
Header Space

 
 

Re: [PATCH 9/19] UML - Tidy ptrace interface

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: WANG Cong <xiyou.wangcong@...>
Cc: <akpm@...>, <linux-kernel@...>, <user-mode-linux-devel@...>
Date: Monday, April 28, 2008 - 11:42 am

On Sat, Apr 26, 2008 at 05:35:38PM +0800, WANG Cong wrote:

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
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 9/19] UML - Tidy ptrace interface, Jeff Dike, (Fri Apr 25, 1:56 pm)
Re: [PATCH 9/19] UML - Tidy ptrace interface, WANG Cong, (Sat Apr 26, 5:35 am)
Re: [PATCH 9/19] UML - Tidy ptrace interface, Jeff Dike, (Mon Apr 28, 11:42 am)
Re: [PATCH 9/19] UML - Tidy ptrace interface, WANG Cong, (Tue Apr 29, 4:14 am)
speck-geostationary