Remove a piece of COMPAT_13, that I mistakenly didn't commit three

hours ago (in my change to drop COMPAT_13 on amd64).
This commit is contained in:
maxv 2017-12-02 15:36:24 +00:00
parent 7621315a4c
commit 7398143904
1 changed files with 2 additions and 66 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: netbsd32_machdep.c,v 1.112 2017/10/19 10:01:09 maxv Exp $ */
/* $NetBSD: netbsd32_machdep.c,v 1.113 2017/12/02 15:36:24 maxv Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.112 2017/10/19 10:01:09 maxv Exp $");
__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.113 2017/12/02 15:36:24 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@ -1133,67 +1133,3 @@ netbsd32_vm_default_addr(struct proc *p, vaddr_t base, vsize_t sz,
else
return VM_DEFAULT_ADDRESS32_BOTTOMUP(base, sz);
}
#ifdef COMPAT_13
int
compat_13_netbsd32_sigreturn(struct lwp *l, const struct compat_13_netbsd32_sigreturn_args *uap, register_t *retval)
{
/* {
syscallarg(struct netbsd32_sigcontext13 *) sigcntxp;
} */
struct proc *p = l->l_proc;
struct netbsd32_sigcontext13 *scp, context;
struct trapframe *tf;
sigset_t mask;
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 = (struct netbsd32_sigcontext13 *)NETBSD32PTR64(SCARG(uap, sigcntxp));
if (copyin((void *)scp, &context, sizeof(*scp)) != 0)
return (EFAULT);
/* Restore register context. */
tf = l->l_md.md_regs;
/*
* Check for security violations.
*/
error = check_sigcontext32(l, (const struct netbsd32_sigcontext *)&context);
if (error != 0)
return error;
tf->tf_gs = context.sc_gs & 0xFFFF;
tf->tf_fs = context.sc_fs & 0xFFFF;
tf->tf_es = context.sc_es & 0xFFFF;
tf->tf_ds = context.sc_ds & 0xFFFF;
tf->tf_rflags = context.sc_eflags;
tf->tf_rdi = context.sc_edi;
tf->tf_rsi = context.sc_esi;
tf->tf_rbp = context.sc_ebp;
tf->tf_rbx = context.sc_ebx;
tf->tf_rdx = context.sc_edx;
tf->tf_rcx = context.sc_ecx;
tf->tf_rax = context.sc_eax;
tf->tf_rip = context.sc_eip;
tf->tf_cs = context.sc_cs & 0xFFFF;
tf->tf_rsp = context.sc_esp;
tf->tf_ss = context.sc_ss & 0xFFFF;
mutex_enter(p->p_lock);
/* Restore signal stack. */
if (context.sc_onstack & SS_ONSTACK)
l->l_sigstk.ss_flags |= SS_ONSTACK;
else
l->l_sigstk.ss_flags &= ~SS_ONSTACK;
/* Restore signal mask. */
native_sigset13_to_sigset((sigset13_t *)&context.sc_mask, &mask);
(void) sigprocmask1(l, SIG_SETMASK, &mask, 0);
mutex_exit(p->p_lock);
return (EJUSTRETURN);
}
#endif