make /dev/pci really readable

John-Mark Gurney gurney_j at
Mon Jun 16 10:06:21 PDT 2003

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

  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."

More information about the freebsd-arch mailing list