diff options
author | kato <kato@FreeBSD.org> | 2002-03-31 08:00:35 +0000 |
---|---|---|
committer | kato <kato@FreeBSD.org> | 2002-03-31 08:00:35 +0000 |
commit | cf12629bdcf1d3d01898f867636181c50222eca8 (patch) | |
tree | f416b217e1fd9a68884b748f3e5df0500238a59e /sys | |
parent | 64158fc8ed2c372a5ef00746835e9603b81b1443 (diff) | |
download | FreeBSD-src-cf12629bdcf1d3d01898f867636181c50222eca8.zip FreeBSD-src-cf12629bdcf1d3d01898f867636181c50222eca8.tar.gz |
MFi386: revision 1.508.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/pc98/i386/machdep.c | 20 | ||||
-rw-r--r-- | sys/pc98/pc98/machdep.c | 20 |
2 files changed, 24 insertions, 16 deletions
diff --git a/sys/pc98/i386/machdep.c b/sys/pc98/i386/machdep.c index ddd958c..65c9201 100644 --- a/sys/pc98/i386/machdep.c +++ b/sys/pc98/i386/machdep.c @@ -566,15 +566,17 @@ osigreturn(td, uap) } */ *uap; { #ifdef COMPAT_43 + struct osigcontext sc; struct trapframe *regs; struct osigcontext *scp; struct proc *p = td->td_proc; - int eflags; + int eflags, error; regs = td->td_frame; - scp = uap->sigcntxp; - if (!useracc((caddr_t)scp, sizeof(*scp), VM_PROT_READ)) - return (EFAULT); + error = copyin(uap->sigcntxp, &sc, sizeof(sc)); + if (error != 0) + return (error); + scp = ≻ eflags = scp->sc_ps; if (eflags & PSL_VM) { struct trapframe_vm86 *tf = (struct trapframe_vm86 *)regs; @@ -680,14 +682,16 @@ sigreturn(td, uap) const __ucontext *sigcntxp; } */ *uap; { + ucontext_t uc; struct proc *p = td->td_proc; struct trapframe *regs; const ucontext_t *ucp; - int cs, eflags; + int cs, eflags, error; - ucp = uap->sigcntxp; - if (!useracc((caddr_t)(uintptr_t)ucp, sizeof(*ucp), VM_PROT_READ)) - return (EFAULT); + error = copyin(uap->sigcntxp, &uc, sizeof(uc)); + if (error != 0) + return (error); + ucp = &uc; regs = td->td_frame; eflags = ucp->uc_mcontext.mc_eflags; if (eflags & PSL_VM) { diff --git a/sys/pc98/pc98/machdep.c b/sys/pc98/pc98/machdep.c index ddd958c..65c9201 100644 --- a/sys/pc98/pc98/machdep.c +++ b/sys/pc98/pc98/machdep.c @@ -566,15 +566,17 @@ osigreturn(td, uap) } */ *uap; { #ifdef COMPAT_43 + struct osigcontext sc; struct trapframe *regs; struct osigcontext *scp; struct proc *p = td->td_proc; - int eflags; + int eflags, error; regs = td->td_frame; - scp = uap->sigcntxp; - if (!useracc((caddr_t)scp, sizeof(*scp), VM_PROT_READ)) - return (EFAULT); + error = copyin(uap->sigcntxp, &sc, sizeof(sc)); + if (error != 0) + return (error); + scp = ≻ eflags = scp->sc_ps; if (eflags & PSL_VM) { struct trapframe_vm86 *tf = (struct trapframe_vm86 *)regs; @@ -680,14 +682,16 @@ sigreturn(td, uap) const __ucontext *sigcntxp; } */ *uap; { + ucontext_t uc; struct proc *p = td->td_proc; struct trapframe *regs; const ucontext_t *ucp; - int cs, eflags; + int cs, eflags, error; - ucp = uap->sigcntxp; - if (!useracc((caddr_t)(uintptr_t)ucp, sizeof(*ucp), VM_PROT_READ)) - return (EFAULT); + error = copyin(uap->sigcntxp, &uc, sizeof(uc)); + if (error != 0) + return (error); + ucp = &uc; regs = td->td_frame; eflags = ucp->uc_mcontext.mc_eflags; if (eflags & PSL_VM) { |