From owner-freebsd-arch@FreeBSD.ORG Mon Jun 16 22:13:37 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1E1B437B401 for ; Mon, 16 Jun 2003 22:13:37 -0700 (PDT) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3811A43F3F for ; Mon, 16 Jun 2003 22:13:36 -0700 (PDT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.8/8.12.3) with ESMTP id h5H5DUkA065417; Mon, 16 Jun 2003 23:13:30 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 16 Jun 2003 23:12:58 -0600 (MDT) Message-Id: <20030616.231258.116352275.imp@bsdimp.com> To: gurney_j@efn.org From: "M. Warner Losh" In-Reply-To: <20030617050905.GE73854@funkthat.com> References: <20030616074122.GF73854@funkthat.com> <20030616.225216.115910026.imp@bsdimp.com> <20030617050905.GE73854@funkthat.com> X-Mailer: Mew version 2.1 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: arch@freebsd.org Subject: Re: make /dev/pci really readable X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jun 2003 05:13:37 -0000 In message: <20030617050905.GE73854@funkthat.com> John-Mark Gurney writes: : M. Warner Losh wrote this message on Mon, Jun 16, 2003 at 22:52 -0600: : > In message: <20030616074122.GF73854@funkthat.com> : > John-Mark Gurney writes: : > : Does anyone have an objection to making /dev/pci really honor the : > : permissions, and giving normal users (or just group wheel) premission : > : to run pciconf -l. Right now the code requires the write bit set for : > : any operation. : > : > Yes. That's too dangerous and will panic a machine. : : I'm not talking about -r... and anyways, I have fixed part of the : problem with unaligned reads/writes which has been posted to this : thread already.... Saw that. Still not sure it is a good idea, but only if the code is reviewed heavily... : > You can get the same information that pciconf -l does by going through : > the alternative interface of devinfo. : : So, I hear you proposing to remove pciconf and the /dev/pci interface? Not really. I'm saying that we should beef up devinfo interface so that it can get PNP information from more databases that just the PCI one. pciconf is the wrong place for -v to be placed. But it was the only place to place it when it was written. Now that other busses have begun to implement pnp info to userland, we should look at a good way to deal. Also, pciconf -r/-w provides inforamtion that devinfo cannot provide. And they serve a useful purpose for low level debugging. Warner