From owner-freebsd-bugs Mon Jan 22 07:03:54 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id HAA18347 for bugs-outgoing; Mon, 22 Jan 1996 07:03:54 -0800 (PST) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id HAA18317 for ; Mon, 22 Jan 1996 07:03:03 -0800 (PST) Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id BAA03551; Tue, 23 Jan 1996 01:59:35 +1100 Date: Tue, 23 Jan 1996 01:59:35 +1100 From: Bruce Evans Message-Id: <199601221459.BAA03551@godzilla.zeta.org.au> To: bugs@FreeBSD.ORG, luigi@labinfo.iet.unipi.it Subject: Re: dd /dev/mem ... Sender: owner-bugs@FreeBSD.ORG Precedence: bulk >Running 2.1R, I tried the following running as root: > dd if=/dev/mem bs=32k skip=512 count=1 | dd bs=32 count=1 | hexdump >and my P100 w/ 16MB was frozen: no keyboard, no mouse, everything >still on the X screen. >the manpage says "Only offsets within the bounds of /dev/mem are >allowed.", and 512*32K is right beyond the physical RAM. However, I >have run C programs which would read beyond the limit with no problems. >Is it a bug in /dev/mem, "dd" or me ? Probably in /dev/mem, the manpage, and you :-). /dev/mem doesn't bound memory in any way. However, the man page may be too restrictive - you may want to access memory not known to the system for some reason. However, you shouldn't be surprised when accessing it does something bad. dd should fail if the memory has holes. There might be special hardware. There might be real memory with uninitialzied parity... Reading beyond the end of physical memory on my 16M system works up to 150MB but is very slow (1.5MB/sec average). Bruce