Lines Matching refs:sf
102 stash_usr_regs(struct rt_sigframe __user *sf, struct pt_regs *regs, in stash_usr_regs() argument
132 err = __copy_to_user(&(sf->uc.uc_mcontext.regs.scratch), &uregs.scratch, in stash_usr_regs()
133 sizeof(sf->uc.uc_mcontext.regs.scratch)); in stash_usr_regs()
136 err |= save_arcv2_regs(&(sf->uc.uc_mcontext), regs); in stash_usr_regs()
138 err |= __copy_to_user(&sf->uc.uc_sigmask, set, sizeof(sigset_t)); in stash_usr_regs()
143 static int restore_usr_regs(struct pt_regs *regs, struct rt_sigframe __user *sf) in restore_usr_regs() argument
149 err = __copy_from_user(&set, &sf->uc.uc_sigmask, sizeof(set)); in restore_usr_regs()
151 &(sf->uc.uc_mcontext.regs.scratch), in restore_usr_regs()
152 sizeof(sf->uc.uc_mcontext.regs.scratch)); in restore_usr_regs()
155 err |= restore_arcv2_regs(&(sf->uc.uc_mcontext), regs); in restore_usr_regs()
198 struct rt_sigframe __user *sf; in SYSCALL_DEFINE0() local
212 sf = (struct rt_sigframe __force __user *)(regs->sp); in SYSCALL_DEFINE0()
214 if (!access_ok(sf, sizeof(*sf))) in SYSCALL_DEFINE0()
217 if (__get_user(magic, &sf->sigret_magic)) in SYSCALL_DEFINE0()
221 if (restore_altstack(&sf->uc.uc_stack)) in SYSCALL_DEFINE0()
224 if (restore_usr_regs(regs, sf)) in SYSCALL_DEFINE0()
273 struct rt_sigframe __user *sf; in setup_rt_frame() local
277 sf = get_sigframe(ksig, regs, sizeof(struct rt_sigframe)); in setup_rt_frame()
278 if (!sf) in setup_rt_frame()
288 err |= stash_usr_regs(sf, regs, set); in setup_rt_frame()
297 err |= copy_siginfo_to_user(&sf->info, &ksig->info); in setup_rt_frame()
298 err |= __put_user(0, &sf->uc.uc_flags); in setup_rt_frame()
299 err |= __put_user(NULL, &sf->uc.uc_link); in setup_rt_frame()
300 err |= __save_altstack(&sf->uc.uc_stack, regs->sp); in setup_rt_frame()
303 regs->r1 = (unsigned long)&sf->info; in setup_rt_frame()
304 regs->r2 = (unsigned long)&sf->uc; in setup_rt_frame()
313 err |= __put_user(magic, &sf->sigret_magic); in setup_rt_frame()
333 regs->sp = (unsigned long)sf; in setup_rt_frame()