 /* Kernel saves and restores only the CS segment register on signals, * which is the bare minimum needed to allow mixed 32/64-bit code. * App's signal handler can save/restore other segments if needed. */ { unsigned cs; err |= __get_user(cs, &sc->cs); regs->cs = cs | 3;	/* Force into user mode */ } 
restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, unsigned long *prax){	unsigned int err = 0;	/* Always make any pending restarted system calls return -EINTR */	current_thread_info()->restart_block.fn = do_no_restart_syscall;#define COPY(x)		err |= __get_user(regs->x, &sc->x)	COPY(rdi); COPY(rsi); COPY(rbp); COPY(rsp); COPY(rbx);	COPY(rdx); COPY(rcx); COPY(rip);	COPY(r8);	COPY(r9);	COPY(r10);	COPY(r11);	COPY(r12);	COPY(r13);	COPY(r14);	COPY(r15);	{		unsigned int tmpflags;		err |= __get_user(tmpflags, &sc->eflags);		regs->eflags = (regs->eflags & ~0x40DD5) | (tmpflags & 0x40DD5);		regs->orig_rax = -1;		/* disable syscall checks */	}	{		struct _fpstate __user * buf;		err |= __get_user(buf, &sc->fpstate);		if (buf) {			if (!access_ok(VERIFY_READ, buf, sizeof(*buf)))				goto badframe;			err |= restore_i387(buf);		} else {			struct task_struct *me = current;			if (used_math()) {				clear_fpu(me);				clear_used_math();			}		}	}	err |= __get_user(*prax, &sc->rax);	return err;badframe:	return 1;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/e4e5d324b9c5586f408a72d1534474c449dd5212/signal.c/clean/arch/x86_64/kernel/signal.c