aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>1995-10-14 05:25:45 +0000
committerBruce Evans <bde@FreeBSD.org>1995-10-14 05:25:45 +0000
commitcb759a257f967f959312ea590200d688d7006756 (patch)
tree02c21afd092a67ac1e6678035d2dd6d5bd9d694b /sys
parentf7faedb40d388d6b081dd90a8ad918f8930da813 (diff)
downloadsrc-cb759a257f967f959312ea590200d688d7006756.tar.gz
src-cb759a257f967f959312ea590200d688d7006756.zip
Don't allow mmapping of physical page 6 (ENXIO).
nxmmap() returned a bogus value as well as having a bogus type. Some drivers use nxmmap() for configured devices (`nx' functions should only be used for unconfigured devices). These drivers allowed mmapping physical page 6, which may have interesting contents. vm has kludges to avoid the same bug with nullop() returning page 0 and enodev() returning page 19 (ENODEV), but didn't handle enxio() returning page 6. vm is the wrong place to handle these bugs.
Notes
Notes: svn path=/head/; revision=11464
Diffstat (limited to 'sys')
-rw-r--r--sys/i386/i386/conf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/i386/i386/conf.c b/sys/i386/i386/conf.c
index 21df2716fc16..312b5f472774 100644
--- a/sys/i386/i386/conf.c
+++ b/sys/i386/i386/conf.c
@@ -42,7 +42,7 @@
* SUCH DAMAGE.
*
* from: @(#)conf.c 5.8 (Berkeley) 5/12/91
- * $Id: conf.c,v 1.99 1995/10/10 08:10:53 swallace Exp $
+ * $Id: conf.c,v 1.100 1995/10/12 23:28:41 bde Exp $
*/
#include <sys/param.h>
@@ -78,7 +78,7 @@ d_rdwr_t rawread, rawwrite;
#define nxstop (d_stop_t *)enxio
#define nxreset (d_reset_t *)enxio
#define nxselect (d_select_t *)enxio
-#define nxmmap (d_mmap_t *)enxio
+#define nxmmap nommap /* must return -1, not ENXIO */
#define nxdevtotty (d_ttycv_t *)nullop
#define zerosize (d_psize_t *)0