>From sbstark!sneaky.lonestar.org!gordon Sat Aug 20 01:54:48 1994 From: sbstark!sneaky.lonestar.org!gordon (Gordon Burditt) Newsgroups: stark.freebsd-bugs Subject: conf.c entry for character device 32 is VERY wrong Date: Sun, 14 Aug 94 07:02 CDT Organization: Gene Stark's home system Distribution: stark NNTP-Posting-Host: home.stark.cs.sunysb.edu To: sbstark!freefall.cdrom.com!FreeBSD-bugfiler Index: sys FreeBSD-1.1.5.1-RELEASE Precedence: bulk Description: The /sys/i386/i386/conf.c entry for the "reserved for local use" character device is disastrously wrong. If a system used to using such a device (e.g. /etc/rc.local tries to initialize it) boots a kernel that doesn't support such a device and then tries to use it, the kernel panics. (I hope you will continue to support a "reserved for local use" device.) Repeat-By: Run from a 1.1.5.1 kernel with an unmodified conf.c. (Preferably in single-user mode with a writable root). # mknod /dev/panic c 32 0 # stty -f /dev/panic clocal Fatal trap 12: page fault while in kernel mode fault virtual address = 0x0 fault code = supervisor read, page not present instruction pointer = 0x0 processor eflags = interrupt enabled, resume, IOPL = 0 current process = 7 (stty) interrupt mask = panic: page fault Fix: Apply the following patch. Index: src/sys/i386/i386/conf.c diff -c -r1.2 -r1.3 *** 1.2 1994/08/09 03:41:20 --- 1.3 1994/08/14 00:31:31 *************** *** 610,616 **** { ukopen, ukclose, noread, nowrite, /*31*/ ukioctl, nostop, nullreset, NULL, /* unknown */ seltrue, nommap, NULL }, /* scsi */ ! { 0, } /* character device 32 is reserved for local use */ /* * If you need a cdev major number, please contact the FreeBSD team * by sending mail to `freebsd-hackers@freefall.cdrom.com'. --- 610,618 ---- { ukopen, ukclose, noread, nowrite, /*31*/ ukioctl, nostop, nullreset, NULL, /* unknown */ seltrue, nommap, NULL }, /* scsi */ ! { noopen, noclose, noread, nowrite, /*32*/ ! noioc, nostop, noreset, NULL, /* reserved */ ! noselect, nommap, nostrat }, /* for local use */ /* * If you need a cdev major number, please contact the FreeBSD team * by sending mail to `freebsd-hackers@freefall.cdrom.com'. Gordon L. Burditt sneaky.lonestar.org!gordon