more paranoid eflags setting.

This commit is contained in:
christos 2008-09-19 19:15:57 +00:00
parent 31c20e0789
commit 1c1f5b603c
4 changed files with 16 additions and 12 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: compat_13_machdep.c,v 1.22 2008/04/28 20:23:24 martin Exp $ */
/* $NetBSD: compat_13_machdep.c,v 1.23 2008/09/19 19:15:57 christos Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2000 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: compat_13_machdep.c,v 1.22 2008/04/28 20:23:24 martin Exp $");
__KERNEL_RCSID(0, "$NetBSD: compat_13_machdep.c,v 1.23 2008/09/19 19:15:57 christos Exp $");
#include "opt_vm86.h"
@ -99,7 +99,8 @@ compat_13_sys_sigreturn(struct lwp *l, const struct compat_13_sys_sigreturn_args
tf->tf_fs = context.sc_fs;
tf->tf_es = context.sc_es;
tf->tf_ds = context.sc_ds;
tf->tf_eflags = context.sc_eflags;
tf->tf_eflags &= ~PSL_USER;
tf->tf_eflags |= context.sc_eflags & PSL_USER;
}
tf->tf_edi = context.sc_edi;
tf->tf_esi = context.sc_esi;

View File

@ -1,4 +1,4 @@
/* $NetBSD: compat_16_machdep.c,v 1.16 2008/04/28 20:23:24 martin Exp $ */
/* $NetBSD: compat_16_machdep.c,v 1.17 2008/09/19 19:15:58 christos Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2000 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: compat_16_machdep.c,v 1.16 2008/04/28 20:23:24 martin Exp $");
__KERNEL_RCSID(0, "$NetBSD: compat_16_machdep.c,v 1.17 2008/09/19 19:15:58 christos Exp $");
#include "opt_vm86.h"
#include "opt_compat_netbsd.h"
@ -120,7 +120,8 @@ compat_16_sys___sigreturn14(struct lwp *l, const struct compat_16_sys___sigretur
tf->tf_fs = context.sc_fs;
tf->tf_es = context.sc_es;
tf->tf_ds = context.sc_ds;
tf->tf_eflags = context.sc_eflags;
tf->tf_eflags &= ~PSL_USER;
tf->tf_eflags |= context.sc_eflags & PSL_USER;
}
tf->tf_edi = context.sc_edi;
tf->tf_esi = context.sc_esi;

View File

@ -1,4 +1,4 @@
/* $NetBSD: freebsd_machdep.c,v 1.51 2008/04/28 20:23:24 martin Exp $ */
/* $NetBSD: freebsd_machdep.c,v 1.52 2008/09/19 19:15:58 christos Exp $ */
/*-
* Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: freebsd_machdep.c,v 1.51 2008/04/28 20:23:24 martin Exp $");
__KERNEL_RCSID(0, "$NetBSD: freebsd_machdep.c,v 1.52 2008/09/19 19:15:58 christos Exp $");
#if defined(_KERNEL_OPT)
#include "opt_vm86.h"
@ -228,7 +228,8 @@ freebsd_sys_sigreturn(struct lwp *l, const struct freebsd_sys_sigreturn_args *ua
tf->tf_fs = context.sc_fs;
tf->tf_es = context.sc_es;
tf->tf_ds = context.sc_ds;
tf->tf_eflags = context.sc_efl;
tf->tf_eflags &= ~PSL_USER;
tf->tf_eflags |= context.sc_efl & PSL_USER;
}
tf->tf_edi = context.sc_edi;
tf->tf_esi = context.sc_esi;

View File

@ -1,4 +1,4 @@
/* $NetBSD: svr4_machdep.c,v 1.91 2008/04/28 20:23:24 martin Exp $ */
/* $NetBSD: svr4_machdep.c,v 1.92 2008/09/19 19:15:58 christos Exp $ */
/*-
* Copyright (c) 1994, 2000 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: svr4_machdep.c,v 1.91 2008/04/28 20:23:24 martin Exp $");
__KERNEL_RCSID(0, "$NetBSD: svr4_machdep.c,v 1.92 2008/09/19 19:15:58 christos Exp $");
#if defined(_KERNEL_OPT)
#include "opt_vm86.h"
@ -230,7 +230,8 @@ svr4_setmcontext(struct lwp *l, svr4_mcontext_t *mc, u_long flags)
if (tf->tf_eflags & PSL_VM)
(*p->p_emul->e_syscall_intern)(p);
#endif
tf->tf_eflags = r[SVR4_X86_EFL];
tf->tf_eflags &= ~PSL_USER;
tf->tf_eflags |= r[SVR4_X86_EFL] & PSL_USER;
}
tf->tf_edi = r[SVR4_X86_EDI];
tf->tf_esi = r[SVR4_X86_ESI];