sigreturn() fix (from kleink)
This commit is contained in:
parent
3f76420b8a
commit
cbcd644ce8
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: psl.h,v 1.1 1999/09/13 10:31:21 itojun Exp $ */
|
/* $NetBSD: psl.h,v 1.2 2001/05/16 12:42:38 msaitoh Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1990 The Regents of the University of California.
|
* Copyright (c) 1990 The Regents of the University of California.
|
||||||
@ -57,8 +57,8 @@
|
|||||||
#define PSL_MBO 0x00000000 /* must be one bits */
|
#define PSL_MBO 0x00000000 /* must be one bits */
|
||||||
#define PSL_MBZ 0x8ffffc0c /* must be zero bits */
|
#define PSL_MBZ 0x8ffffc0c /* must be zero bits */
|
||||||
|
|
||||||
#define PSL_USERSET 0
|
#define PSL_USERSET 0
|
||||||
#define PSL_USERSTATIC (PSL_BL|PSL_RB|PSL_MD|PSL_IMASK)
|
#define PSL_USERSTATIC (PSL_BL|PSL_RB|PSL_MD|PSL_IMASK|PSL_MBO|PSL_MBZ)
|
||||||
|
|
||||||
#ifdef _KERNEL
|
#ifdef _KERNEL
|
||||||
#include <machine/intr.h>
|
#include <machine/intr.h>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: compat_13_machdep.c,v 1.2 2000/12/22 22:58:55 jdolecek Exp $ */
|
/* $NetBSD: compat_13_machdep.c,v 1.3 2001/05/16 12:42:38 msaitoh Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
|
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
|
||||||
@ -71,16 +71,9 @@ compat_13_sys_sigreturn(p, v, retval)
|
|||||||
/* Restore register context. */
|
/* Restore register context. */
|
||||||
tf = p->p_md.md_regs;
|
tf = p->p_md.md_regs;
|
||||||
|
|
||||||
/*
|
/* Check for security violations. */
|
||||||
* Check for security violations. If we're returning to
|
|
||||||
* protected mode, the CPU will validate the segment registers
|
|
||||||
* automatically and generate a trap on violations. We handle
|
|
||||||
* the trap, rather than doing all of the checking here.
|
|
||||||
*/
|
|
||||||
#ifdef TODO
|
|
||||||
if (((context.sc_ssr ^ tf->tf_ssr) & PSL_USERSTATIC) != 0)
|
if (((context.sc_ssr ^ tf->tf_ssr) & PSL_USERSTATIC) != 0)
|
||||||
return (EINVAL);
|
return (EINVAL);
|
||||||
#endif
|
|
||||||
|
|
||||||
tf->tf_ssr = context.sc_ssr;
|
tf->tf_ssr = context.sc_ssr;
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: sh3_machdep.c,v 1.12 2001/04/24 04:31:09 thorpej Exp $ */
|
/* $NetBSD: sh3_machdep.c,v 1.13 2001/05/16 12:42:38 msaitoh Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
|
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
|
||||||
@ -350,21 +350,13 @@ sys___sigreturn14(p, v, retval)
|
|||||||
|
|
||||||
/* Restore signal context. */
|
/* Restore signal context. */
|
||||||
tf = p->p_md.md_regs;
|
tf = p->p_md.md_regs;
|
||||||
{
|
|
||||||
/*
|
|
||||||
* Check for security violations. If we're returning to
|
|
||||||
* protected mode, the CPU will validate the segment registers
|
|
||||||
* automatically and generate a trap on violations. We handle
|
|
||||||
* the trap, rather than doing all of the checking here.
|
|
||||||
*/
|
|
||||||
#ifdef TODO
|
|
||||||
if (((context.sc_ssr ^ tf->tf_ssr) & PSL_USERSTATIC) != 0) {
|
|
||||||
return (EINVAL);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
tf->tf_ssr = context.sc_ssr;
|
/* Check for security violations. */
|
||||||
}
|
if (((context.sc_ssr ^ tf->tf_ssr) & PSL_USERSTATIC) != 0)
|
||||||
|
return (EINVAL);
|
||||||
|
|
||||||
|
tf->tf_ssr = context.sc_ssr;
|
||||||
|
|
||||||
tf->tf_r0 = context.sc_r0;
|
tf->tf_r0 = context.sc_r0;
|
||||||
tf->tf_r1 = context.sc_r1;
|
tf->tf_r1 = context.sc_r1;
|
||||||
tf->tf_r2 = context.sc_r2;
|
tf->tf_r2 = context.sc_r2;
|
||||||
|
Loading…
Reference in New Issue
Block a user