> This is just a draft.
>
> Index: arch/hppa/hppa/machdep.c

> @@ -1329,11 +1330,31 @@ sys_sigreturn(struct proc *p, void *v, r
>       struct trapframe *tf = p->p_md.md_regs;
>       int error;
>  
> +     if (PROC_PC(p) != (u_int64_t)p->p_p->ps_sigcode +

Why uint64_t here? This is a 32-bit platfoâ…»m.

> Index: arch/m88k/m88k/sig_machdep.c

> @@ -207,18 +207,34 @@ sys_sigreturn(struct proc *p, void *v, r
>       struct sys_sigreturn_args /* {
>          syscallarg(struct sigcontext *) sigcntxp;
>       } */ *uap = v;
> -     struct sigcontext *scp;
> +     struct sigcontext *scp = SCARG(uap, sigcntxp);
>       struct trapframe *tf;
>       struct sigcontext ksc;
>  
> -     scp = (struct sigcontext *)SCARG(uap, sigcntxp);
> -#ifdef DEBUG
> -     if (sigdebug & SDB_FOLLOW)
> -             printf("sigreturn: pid %d, scp %p\n", p->p_pid, scp);
> -#endif
> -     if (((vaddr_t)scp & 3) != 0 ||
> -         copyin((caddr_t)scp, (caddr_t)&ksc, sizeof(struct sigcontext)))
> +     if (PROC_PC(p) != (u_int64_t)p->p_p->ps_sigcode +

Ditto.

> Index: arch/macppc/macppc/machdep.c

> @@ -512,8 +513,29 @@ sys_sigreturn(struct proc *p, void *v, r
>       struct trapframe *tf;
>       int error;
>  
> +     if (PROC_PC(p) != (u_int64_t)p->p_p->ps_sigcode +

Same.

> Index: arch/sh/sh/sh_machdep.c

> @@ -519,18 +520,32 @@ sys_sigreturn(struct proc *p, void *v, r
>       struct sys_sigreturn_args /* {
>               syscallarg(struct sigcontext *) sigcntxp;
>       } */ *uap = v;
> -     struct sigcontext *scp, context;
> +     struct sigcontext *scp = SCARG(uap, sigcntxp), context;
>       struct trapframe *tf;
>       int error;
>  
> -     /*
> -      * The trampoline code hands us the context.
> -      * It is unsafe to keep track of it ourselves, in the event that a
> -      * program jumps out of a signal handler.
> -      */
> -     scp = SCARG(uap, sigcntxp);
> +     if (PROC_PC(p) != (u_int64_t)p->p_p->ps_sigcode +

Guess.

> Index: arch/socppc/socppc/machdep.c

> @@ -539,8 +540,30 @@ sys_sigreturn(struct proc *p, void *v, r
>       struct trapframe *tf;
>       int error;
>  
> +     if (PROC_PC(p) != (u_int64_t)p->p_p->ps_sigcode +

Yawn.

Reply via email to