From owner-freebsd-current Fri Dec 20 0:12:25 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 68E2D37B401 for ; Fri, 20 Dec 2002 00:12:23 -0800 (PST) Received: from area51.slashnet.org (area51.slashnet.org [209.150.98.86]) by mx1.FreeBSD.org (Postfix) with ESMTP id CAEF143EDA for ; Fri, 20 Dec 2002 00:12:22 -0800 (PST) (envelope-from smkelly@zombie.org) Received: from edgemaster.zombie.org (ip68-13-64-165.om.om.cox.net [68.13.64.165]) by area51.slashnet.org (Postfix) with ESMTP id 98BEB4A358; Fri, 20 Dec 2002 03:12:16 -0500 (EST) Received: by edgemaster.zombie.org (Postfix, from userid 1001) id 1E59E41562; Fri, 20 Dec 2002 02:12:16 -0600 (CST) Date: Fri, 20 Dec 2002 02:12:16 -0600 From: Sean Kelly To: Nate Lawson Cc: current@freebsd.org Subject: Re: `cat /dev/io` leads to system lockup. Message-ID: <20021220081215.GA35355@edgemaster.zombie.org> References: <20021220062935.GA699@edgemaster.zombie.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="sdtB3X0nJg68CQEu" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.1i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --sdtB3X0nJg68CQEu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 19, 2002 at 11:35:01PM -0800, Nate Lawson wrote: > On Fri, 20 Dec 2002, Sean Kelly wrote: > > On my 5.0-CURRENT kernel built 45 minutes ago, I can bring my system to= its > > knees by doing > >=20 > > # cat /dev/io > >=20 > > While I understand that this isn't exactly something one would normally= be > > doing, is it really something that should bring the system down? >=20 > You're running as root. So does "yes > /dev/da0" and "cat /dev/urandom > > /dev/mem" and ... (infinity) While I don't really care to test it, I wager that `yes >/dev/da0` will not cause the system to lock hard. But you seem to be talking abot something very different. You are talking about WRITING. I am talking about READING. # cat /dev/da0 # cat /dev/urandom None of these bring the system to its knees. So why does # cat /dev/io totally lock my system solid? According to the manpage: The special file /dev/io is a controlled security hole that allows a pro- cess to gain I/O privileges (which are normally reserved for kernel- internal code). Any process that holds a file descriptor on /dev/io open will get its IOPL bits in the flag register set, thus allowing it to per- form direct I/O operations. =20 This says nothing about what happens if you attempt to read() from /dev/io, as `cat /dev/io` would be expected to do. At the least, there should be a big, fat, blinking WARNING on the manpage telling you that `cat /dev/io` wi= ll bring your system down. --=20 Sean Kelly | PGP KeyID: D2E5E296 smkelly@zombie.org | http://www.zombie.org --sdtB3X0nJg68CQEu Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE+AtDfPm7A9NLl4pYRAoDzAJ4y3u/8ueWaibL9S3n6nxAkeozO9QCgzmHy ygdiWHnsYrwhXuAp2hopams= =wY4c -----END PGP SIGNATURE----- --sdtB3X0nJg68CQEu-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message