From owner-freebsd-doc Sat Nov 23 17:50: 9 2002 Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AE33F37B401 for ; Sat, 23 Nov 2002 17:50:04 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id D28B743E6E for ; Sat, 23 Nov 2002 17:50:03 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id gAO1o3x3046693 for ; Sat, 23 Nov 2002 17:50:03 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id gAO1o3po046692; Sat, 23 Nov 2002 17:50:03 -0800 (PST) Date: Sat, 23 Nov 2002 17:50:03 -0800 (PST) Message-Id: <200211240150.gAO1o3po046692@freefall.freebsd.org> To: freebsd-doc@FreeBSD.org Cc: From: Hiten Pandya Subject: Re: docs/43678 [PATCH] Updates for the pciconf(8) manual page Reply-To: Hiten Pandya Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR docs/43678; it has been noted by GNATS. From: Hiten Pandya To: Tom Rhodes Cc: freebsd-gnats-submit@FreeBSD.org Subject: Re: docs/43678 [PATCH] Updates for the pciconf(8) manual page Date: Sat, 23 Nov 2002 20:48:55 -0500 --5mCyUwZo2JvN/JJP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Nov 14, 2002 at 11:36:41PM -0500, Tom Rhodes wrote the words in effect of: > Hiten, > > This isn't bad, but we have a slight problem :( > > This really isn't the a problem with pciconf(8) and non-root users, > its actually the fact that non-root users do not (and should not) > have write access to /dev/pci. Something like (without mdoc(7)): > > pciconf(8) is limited to users with write access to /dev/pci, usually > root. > > We get that taken care of, I see no reason why NOT to commit this > patch and close this PR. What do you think? > Tom, Thanks for your feedback, I apologize for taking such a long time in replying. Anyway, I am attaching a patch, to resolve this issue, and while I was at that, I added some more things. Please review it, and let me know. Cheers. -- Hiten (hiten@unixdaemons.com, hiten@uk.FreeBSD.org) http://www.unixdaemons.com/~hiten/ --5mCyUwZo2JvN/JJP Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="pciconf.8.patch" Index: pciconf.8 =================================================================== RCS file: /home/ncvs/src/usr.sbin/pciconf/pciconf.8,v retrieving revision 1.22 diff -u -r1.22 pciconf.8 --- pciconf.8 2002/09/17 18:10:39 1.22 +++ pciconf.8 2002/11/24 01:30:28 @@ -108,11 +108,10 @@ device, which contains several (similar or independent) functions on one chip. .Pp -The -.Fl l -option is the only one available to non-root users. -All other invocations of +All invocations of .Nm +except for +.Fl l require a .Ar selector of the form @@ -163,6 +162,13 @@ .Fl h indicates a halfword (two-byte) operation. The default is to read or write a longword (four bytes). +.Pp +.Sh NOTE +.Nm +is limited to users with right access to +.Em /dev/pci , +usually +.Em root . .Sh ENVIRONMENT The PCI vendor/device information database is normally read from .Pa /usr/share/misc/pci_vendors . @@ -170,7 +176,8 @@ .Ev PCICONF_VENDOR_DATABASE . .Sh SEE ALSO .Xr ioctl 2 , -.\" .Xr pci 4 , +.Xr pci 4 , +.Xr devinfo 8 , .Xr kldload 8 .Sh HISTORY The @@ -200,15 +207,3 @@ .Nm , but not in the underlying .Xr ioctl 2 . -.Pp -It might be useful to give non-root users access to the -.Fl a -and -.Fl r -options. -But only root will be able to execute a -.Nm kldload -to provide the device with a driver KLD, and reading of configuration space -registers may cause a failure in badly designed -.Tn PCI -chips. --5mCyUwZo2JvN/JJP-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message