Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Oct 1996 11:45:12 +0200 (MET DST)
From:      J Wunsch <j@uriah.heep.sax.de>
To:        freebsd-current@FreeBSD.org (FreeBSD-current users)
Subject:   Message buffer oddity
Message-ID:  <199610130945.LAA00320@uriah.heep.sax.de>

next in thread | raw e-mail | index | archive | help
Hi all,

after upgrading to -current last night, i've seen the strange behaviour
of the kernel message buffer below.  The only modification i've made is

Index: /sys/sys/msgbuf.h
===================================================================
RCS file: /home/cvs/src/sys/sys/msgbuf.h,v
retrieving revision 1.6
diff -u -u -r1.6 msgbuf.h
--- msgbuf.h	1995/08/07 07:58:23	1.6
+++ msgbuf.h	1996/08/17 20:35:16
@@ -37,7 +37,7 @@
 #ifndef _SYS_MSGBUF_H_
 #define _SYS_MSGBUF_H_
 
-#define	MSG_BSIZE	(4096 - 3 * sizeof(unsigned int))
+#define	MSG_BSIZE	(2 * 4096 - 3 * sizeof(unsigned int))
 struct msgbuf {
 #define	MSG_MAGIC	0x063061
 	unsigned int	msg_magic;

i.e., the message buffer is increased to (what i think) two pages.
Now, the device probe gave me:

(ncr0:3:0): "SONY SMO-C501-09   KG 2.13" type 0 removable SCSI 1
od0(ncr0:3:0): Optical 281MB (576999 512 byte sectors)
od0(ncr0:3:0): with approximate 18612 cyls, 1 heads, and 31 sectors/track
(ncr0:4:0): "TANDBEHi all,

after upgrading to -current last night, i've seen the strange behaviour
of the kernel message buffer below.  The only modification i've made is

Index: /sys/sys/msgbuf.h
===================================================================

As you can see, the mail i'm just typing goes to the kernel message
buffer!  (Right after booting, there has been junk in this area.)

Normally, this should have been:

Oct 13 03:11:31 uriah /kernel: (ncr0:4:0): "TANDBERG  TDC 4222 =07:" type 1 removable SCSI 2
Oct 13 03:11:31 uriah /kernel: st0(ncr0:4:0): Sequential-Access 
Oct 13 03:11:31 uriah /kernel: st0(ncr0:4:0): asynchronous.
Oct 13 03:11:31 uriah /kernel: density code 0x0, 512-byte blocks, write-enabled
Oct 13 03:11:31 uriah /kernel: Probing for devices on the ISA bus:
Oct 13 03:11:31 uriah /kernel: vt0 at 0x60-0x6f irq 1 on motherboard
Oct 13 03:11:31 uriah /kernel: vt0: unkown s3, 80 col, color, 8 scr, mf2-kbd, [R3.20-b24]

etc.

The syslog has registered everything up to the "TANDBE .

Right now, dmesg shows me:

od0(ncr0:3:0): Optical 281MB (576999 512 byte sectors)
od0(ncr0:3:0): with approximate 18612 cyls, 1 heads, and 31 sectors/track
(ncr0:4:0): "TANDBElę\^D

So the tail of the message buffer is overwritten again and again, at
an odd address (*msgbufp + 6905).  Is this due to me extending it
beyond 4 KB?  (The kernel has been recompiled from scratch, and i used
to run previous kernels with this modification without problems.)

I gonna reboot now again, and see whether this will happen again.  Of
course, i have to send the mail before...

-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199610130945.LAA00320>