From owner-freebsd-stable Tue Sep 26 7:17: 0 2000 Delivered-To: freebsd-stable@freebsd.org Received: from torn.eau.ee (torn.eau.ee [193.40.25.218]) by hub.freebsd.org (Postfix) with ESMTP id EF8B937B422 for ; Tue, 26 Sep 2000 07:16:37 -0700 (PDT) Received: from localhost (markko@localhost) by torn.eau.ee (8.9.3/8.9.3) with ESMTP id OAA59023 for ; Tue, 26 Sep 2000 14:16:27 GMT (envelope-from markko@torn.eau.ee) Date: Tue, 26 Sep 2000 14:16:27 +0000 (GMT) From: Markko Merzin To: freebsd-stable@FreeBSD.ORG Subject: DOS in newpcm audio driver Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi! Any user with read-write access to audio device files (/dev/audio, /dev/dsp*) can cause system panic and reboot. Dont forget remount your filesystems, exept /, read-only before trying this. It goes like this: # Play an au file: [1] markko@leida:~$ cat soundfile.au >/dev/audio & # while it plays, open /dev/dsp for reading. [2] markko@leida:~$ cat /dev/null # wait few seconds and hit control C # panic, reboot ... Or: [1] markko@leida:~$ mpg123 -q mpegfile.mp3 & [2] markko@leida:~$ cat /dev/null and so on.. One more complain about audio recording: many audio-conference tools open audio device with two different processes, one for reading and one for writing. But when reading process closes device and tries open it again, while writing process still holding it, then audio system become unusable untill both, writing and reading process, releases device and reopens it again. Example: [3] markko@leida:~$ cat audiofile.au >/dev/audio & # while it plays [4] markko@leida:~$ cat /dev/audio > kamm.au # lets hit control C [5] markko@leida:~$ cat /dev/audio>kamm cat: /dev/audio: Device busy [6] markko@leida:~$ cat /dev/audio>kamm cat: /dev/audio: Device busy After few seconds those messages appear in console window: pcm0: record overrun, dumping 8192 bytes Some background info: [7] markko@leida:~$ cat /dev/sndstat FreeBSD Audio Driver (newpcm) Sep 22 2000 21:07:39 Installed devices: pcm0: at io 0x530 irq 5 drq 0:1 (1p/1r channels duplex) # this message will be end after full 'dmesg' output. [8] markko@leida:~$ dmesg Copyright (c) 1992-2000 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 4.1-STABLE #0: Fri Sep 22 21:12:12 EET 2000 root@leida.torn.eau.ee:/opt/obj/opt/src/sys/LEIDA.IPF Timecounter "i8254" frequency 1193182 Hz Timecounter "TSC" frequency 75171053 Hz CPU: Pentium/P54C (75.17-MHz 586-class CPU) Origin = "GenuineIntel" Id = 0x525 Stepping = 5 Features=0x1bf real memory = 16777216 (16384K bytes) config> quit avail memory = 13578240 (13260K bytes) Preloaded elf kernel "kernel" at 0xc02f8000. Preloaded userconfig_script "/boot/kernel.conf" at 0xc02f809c. Intel Pentium detected, installing workaround for F00F bug npx0: on motherboard npx0: INT 16 interface pcib0: on motherboard pci0: on pcib0 isab0: at device 1.0 on pci0 isa0: on isab0 ide_pci0: port 0x4000-0x400f,0-0x3,0-0x7,0-0x3,0-0x7 irq 0 at device 1.1 on pci0 ide_pci0: driver is using old-style compatability shims pci0: at 15.0 irq 9 xl0: <3Com 3c900-COMBO Etherlink XL> port 0x6000-0x603f irq 10 at device 17.0 on pci0 xl0: Ethernet address: 00:10:4b:4a:c4:43 xl0: selecting 10baseT transceiver, half duplex fdc0: at port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on isa0 fdc0: FIFO enabled, 8 bytes threshold fd0: <1440-KB 3.5" drive> on fdc0 drive 0 fd1: <1200-KB 5.25" drive> on fdc0 drive 1 wdc0 at port 0x1f0-0x1f7 irq 14 on isa0 wdc0: unit 0 (wd0): wd0: 19470MB (39876480 sectors), 39560 cyls, 16 heads, 63 S/T, 512 B/S wdc0: driver is using old-style compatability shims wdc1 at port 0x170-0x177 irq 15 on isa0 wdc1: unit 0 (wd2): wd2: 520MB (1065456 sectors), 1057 cyls, 16 heads, 63 S/T, 512 B/S wdc1: driver is using old-style compatability shims atkbdc0: at port 0x60,0x64 on isa0 atkbd0: irq 1 on atkbdc0 vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 sc0: on isa0 sc0: VGA <16 virtual consoles, flags=0x200> sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0 sio0: type 16550A sio1 at port 0x2f8-0x2ff irq 3 on isa0 sio1: type 16550A pcm0: at port 0x220-0x22f,0x530-0x537,0x388-0x38b,0x330-0x331,0x370-0x371 irq 5 drq 0,1 on isa0 joy0: at port 0x201 on isa0 IP Filter: v3.4.8 initialized. Default = pass all, Logging = enabled Mounting root from ufs:/dev/wd0s1a WARNING: / was not properly dismounted -- Markko To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message