Thu Sep 18 21:09:18 2008 UTC ()
Remove PSL_MBO (the bits that Must Be One) from PSL_USER - which are the
bits that the 'user' can change.
Who knows what the effect of a user signal handler (which I think might have
access to the bits) changing these bits might be!


(dsl)
diff -r1.5 -r1.6 src/sys/arch/x86/include/psl.h

cvs diff -r1.5 -r1.6 src/sys/arch/x86/include/psl.h (expand / switch to unified diff)

--- src/sys/arch/x86/include/psl.h 2008/09/18 15:57:04 1.5
+++ src/sys/arch/x86/include/psl.h 2008/09/18 21:09:18 1.6
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: psl.h,v 1.5 2008/09/18 15:57:04 christos Exp $ */ 1/* $NetBSD: psl.h,v 1.6 2008/09/18 21:09:18 dsl Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1990 The Regents of the University of California. 4 * Copyright (c) 1990 The Regents of the University of California.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to Berkeley by 7 * This code is derived from software contributed to Berkeley by
8 * William Jolitz. 8 * William Jolitz.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -60,26 +60,26 @@ @@ -60,26 +60,26 @@
60 60
61#define PSL_MBO 0x00000002 /* must be one bits */ 61#define PSL_MBO 0x00000002 /* must be one bits */
62#define PSL_MBZ 0xffc08028 /* must be zero bits */ 62#define PSL_MBZ 0xffc08028 /* must be zero bits */
63 63
64#define PSL_USERSET (PSL_MBO | PSL_I) 64#define PSL_USERSET (PSL_MBO | PSL_I)
65#if defined(_KERNEL_OPT) 65#if defined(_KERNEL_OPT)
66#include "opt_vm86.h" 66#include "opt_vm86.h"
67#endif 67#endif
68#ifdef VM86 68#ifdef VM86
69#define PSL_USERSTATIC (PSL_MBO | PSL_MBZ | PSL_I | PSL_IOPL | PSL_NT | PSL_VIF | PSL_VIP) 69#define PSL_USERSTATIC (PSL_MBO | PSL_MBZ | PSL_I | PSL_IOPL | PSL_NT | PSL_VIF | PSL_VIP)
70#else 70#else
71#define PSL_USERSTATIC (PSL_MBO | PSL_MBZ | PSL_I | PSL_IOPL | PSL_NT | PSL_VM | PSL_VIF | PSL_VIP) 71#define PSL_USERSTATIC (PSL_MBO | PSL_MBZ | PSL_I | PSL_IOPL | PSL_NT | PSL_VM | PSL_VIF | PSL_VIP)
72#endif 72#endif
73#define PSL_USER (PSL_C | PSL_MBO | PSL_PF | PSL_AF | PSL_Z | PSL_N | \ 73#define PSL_USER (PSL_C | PSL_PF | PSL_AF | PSL_Z | PSL_N | \
74 PSL_T | PSL_V | PSL_D) 74 PSL_T | PSL_V | PSL_D)
75#define PSL_CLEARSIG (PSL_T | PSL_VM | PSL_AC | PSL_D) 75#define PSL_CLEARSIG (PSL_T | PSL_VM | PSL_AC | PSL_D)
76 76
77 77
78/* 78/*
79 * ??? 79 * ???
80 */ 80 */
81#ifdef _KERNEL 81#ifdef _KERNEL
82#include <machine/intr.h> 82#include <machine/intr.h>
83#endif 83#endif
84 84
85#endif /* !_X86_PSL_H_ */ 85#endif /* !_X86_PSL_H_ */