HomeFreeBSD

Require write access when mmapping BAR.

Description

Require write access when mmapping BAR.

This actually makes the rights requirements for accessing PCI config
space and BARs using /dev/pci same. Since unchanged /dev/pci mode
only allows write open for root, default configuration de-facto limits
the BAR read to root only. In particular, state-changing reads of the
registers are limited to root.

Discussed with: se
Suggested and reviewed by: jhb (kernel part)
Sponsored by: The FreeBSD Foundation
MFC after: 12 days
Differential revision: https://reviews.freebsd.org/D16580

Details

Provenance
kibAuthored on
Differential Revision
D16580: Change default group and mode of /dev/pci to be the same as /dev/mem.
Parents
rS337268: Fix word-size dumping.
Branches
Unknown
Tags
Unknown