Date: Mon, 16 Jun 2003 12:37:25 -0600 From: Scott Long <scottl@freebsd.org> To: John-Mark Gurney <gurney_j@efn.org> Cc: arch@freebsd.org Subject: Re: make /dev/pci really readable Message-ID: <3EEE0E65.1000304@freebsd.org> In-Reply-To: <20030616170645.GI73854@funkthat.com> References: <20030616074122.GF73854@funkthat.com> <20030616193932.X27844@gamplex.bde.org> <20030616170645.GI73854@funkthat.com>
next in thread | previous in thread | raw e-mail | index | archive | help
John-Mark Gurney wrote: > Bruce Evans wrote this message on Mon, Jun 16, 2003 at 19:42 +1000: > >>On Mon, 16 Jun 2003, John-Mark Gurney wrote: >> >> >>>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. >> >>IIRC, it is like it is because reading it may have side effects (and >>thus isn't really just reading). If it honored the permissions then >>it should have mode 600 so that normal users can't run pciconf -l :-]. > > > Now if we were reading the pci registers with -r, then yes, but -l just > copys the data from pci_devinfo. If we wanted to make -r readable, we'd > have to clamp the registers passed in, and make sure that all platforms > didn't trap on PCI register reads (a patch for sparc should be going in > soon). > It sounds like a reasonable idea to me. Yes, actually reading the PCI config register space from userland is generally not something that an unpriviledged user should be allowed to do because of the side effects that others have mentioned. As long as 'pciconf -l' doesn't present an information security hole or DOS opportunity, it sounds like a good idea. Scott
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3EEE0E65.1000304>