/* * Set up the return code ... * *         li      v0, __NR_rt_sigreturn *         syscall */ if (PLAT_TRAMPOLINE_STUFF_LINE) __clear_user(frame->rs_code, PLAT_TRAMPOLINE_STUFF_LINE); err |= __put_user(0x24020000 + __NR_N32_rt_sigreturn, frame->rs_code + 0); err |= __put_user(0x0000000c                        , frame->rs_code + 1); flush_cache_sigtramp((unsigned long) frame->rs_code); 
install_sigtramp(frame->rs_code, __NR_N32_rt_sigreturn); 
void setup_rt_frame_n32(struct k_sigaction * ka,	struct pt_regs *regs, int signr, sigset_t *set, siginfo_t *info){	struct rt_sigframe_n32 *frame;	int err = 0;	s32 sp;	frame = get_sigframe(ka, regs, sizeof(*frame));	if (!access_ok(VERIFY_WRITE, frame, sizeof (*frame)))		goto give_sigsegv;	/*	 * Set up the return code ...	 *	 *         li      v0, __NR_rt_sigreturn	 *         syscall	 */	if (PLAT_TRAMPOLINE_STUFF_LINE)		__clear_user(frame->rs_code, PLAT_TRAMPOLINE_STUFF_LINE);	err |= __put_user(0x24020000 + __NR_N32_rt_sigreturn, frame->rs_code + 0);	err |= __put_user(0x0000000c                        , frame->rs_code + 1);	flush_cache_sigtramp((unsigned long) frame->rs_code);	/* Create siginfo.  */	err |= copy_siginfo_to_user(&frame->rs_info, info);	/* Create the ucontext.  */	err |= __put_user(0, &frame->rs_uc.uc_flags);	err |= __put_user(0, &frame->rs_uc.uc_link);        sp = (int) (long) current->sas_ss_sp;	err |= __put_user(sp,	                  &frame->rs_uc.uc_stack.ss_sp);	err |= __put_user(sas_ss_flags(regs->regs[29]),	                  &frame->rs_uc.uc_stack.ss_flags);	err |= __put_user(current->sas_ss_size,	                  &frame->rs_uc.uc_stack.ss_size);	err |= setup_sigcontext(regs, &frame->rs_uc.uc_mcontext);	err |= __copy_to_user(&frame->rs_uc.uc_sigmask, set, sizeof(*set));	if (err)		goto give_sigsegv;	/*	 * Arguments to signal handler:	 *	 *   a0 = signal number	 *   a1 = 0 (should be cause)	 *   a2 = pointer to ucontext	 *	 * $25 and c0_epc point to the signal handler, $29 points to	 * the struct rt_sigframe.	 */	regs->regs[ 4] = signr;	regs->regs[ 5] = (unsigned long) &frame->rs_info;	regs->regs[ 6] = (unsigned long) &frame->rs_uc;	regs->regs[29] = (unsigned long) frame;	regs->regs[31] = (unsigned long) frame->rs_code;	regs->cp0_epc = regs->regs[25] = (unsigned long) ka->sa.sa_handler;#if DEBUG_SIG	printk("SIG deliver (%s:%d): sp=0x%p pc=0x%lx ra=0x%p\n",	       current->comm, current->pid,	       frame, regs->cp0_epc, regs->regs[31]);#endif	return;give_sigsegv:	force_sigsegv(signr, current);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/02416dcf5a94af34bcd28b4baf25bbbf399d8136/signal_n32.c/buggy/arch/mips/kernel/signal_n32.c