p->thread.esp0 = (unsigned long) (childregs+1); 
/* * The below -8 is to reserve 8 bytes on top of the ring0 stack. * This is necessary to guarantee that the entire "struct pt_regs" * is accessable even if the CPU haven't stored the SS/ESP registers * on the stack (interrupt gate does not save these registers * when switching to the same priv ring). * Therefore beware: accessing the xss/esp fields of the * "struct pt_regs" is possible, but they may contain the * completely wrong values. */ p->thread.esp0 = (unsigned long) (childregs+1) - 8; 
int copy_thread(int nr, unsigned long clone_flags, unsigned long esp,	unsigned long unused,	struct task_struct * p, struct pt_regs * regs){	struct pt_regs * childregs;	struct task_struct *tsk;	int err;	childregs = ((struct pt_regs *) (THREAD_SIZE + (unsigned long) p->thread_info)) - 1;	*childregs = *regs;	childregs->eax = 0;	childregs->esp = esp;	p->thread.esp = (unsigned long) childregs;	p->thread.esp0 = (unsigned long) (childregs+1);	p->thread.eip = (unsigned long) ret_from_fork;	savesegment(fs,p->thread.fs);	savesegment(gs,p->thread.gs);	tsk = current;	if (unlikely(NULL != tsk->thread.io_bitmap_ptr)) {		p->thread.io_bitmap_ptr = kmalloc(IO_BITMAP_BYTES, GFP_KERNEL);		if (!p->thread.io_bitmap_ptr) {			p->thread.io_bitmap_max = 0;			return -ENOMEM;		}		memcpy(p->thread.io_bitmap_ptr, tsk->thread.io_bitmap_ptr,			IO_BITMAP_BYTES);	}	/*	 * Set a new TLS for the child thread?	 */	if (clone_flags & CLONE_SETTLS) {		struct desc_struct *desc;		struct user_desc info;		int idx;		err = -EFAULT;		if (copy_from_user(&info, (void __user *)childregs->esi, sizeof(info)))			goto out;		err = -EINVAL;		if (LDT_empty(&info))			goto out;		idx = info.entry_number;		if (idx < GDT_ENTRY_TLS_MIN || idx > GDT_ENTRY_TLS_MAX)			goto out;		desc = p->thread.tls_array + idx - GDT_ENTRY_TLS_MIN;		desc->a = LDT_entry_a(&info);		desc->b = LDT_entry_b(&info);	}	err = 0; out:	if (err && p->thread.io_bitmap_ptr) {		kfree(p->thread.io_bitmap_ptr);		p->thread.io_bitmap_max = 0;	}	return err;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/5df240826c90afdc7956f55a004ea6b702df9203/process.c/clean/arch/i386/kernel/process.c