|
where is the register sets of user space stored in kerne stack while after syscall October 16, 2009 06:13AM |
Quote:Register set is easy to do, as long as you know where it is. On Linux, there is a simple connection between the locations of process' task structure and its register set location:
Assuming struct task_struct *p is a pointer to the task structure, then the corresponding register set location is:
struct pt_regs *regs = ((struct pt_regs *)(2*PAGE_SIZE + (unsigned long)p)) - 1;
