Module Name: src Committed By: maxv Date: Sat Dec 2 15:36:24 UTC 2017
Modified Files: src/sys/arch/amd64/amd64: netbsd32_machdep.c Log Message: Remove a piece of COMPAT_13, that I mistakenly didn't commit three hours ago (in my change to drop COMPAT_13 on amd64). To generate a diff of this commit: cvs rdiff -u -r1.112 -r1.113 src/sys/arch/amd64/amd64/netbsd32_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/amd64/amd64/netbsd32_machdep.c diff -u src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.112 src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.113 --- src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.112 Thu Oct 19 10:01:09 2017 +++ src/sys/arch/amd64/amd64/netbsd32_machdep.c Sat Dec 2 15:36:24 2017 @@ -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, 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