看板 FB_stable 關於我們 聯絡資訊
perryh@pluto.rain.com wrote: > John Baldwin <jhb@freebsd.org> wrote: >> On Friday, September 10, 2010 2:55:15 am perryh@pluto.rain.com wrote: >>> ... >>> It is arguably a bug to open O_RDWR when only examining things. >> You have to have RDWR permission to issue the ioctl to read config >> registers which pciconf does when examining capabilities. > > So much for avoiding a reboot for <bsd@lordcow.org> (or whatever the > correct address is -- that one bounced), but now it is beginning to > look as if there may be a POLA violation at a lower level. Unless > there are devices out there whose state can be changed by merely > _reading_ (not writing) their configuration registers, I would not > expect to need RDWR permission just to read them. Umm, not all config registers are standardized and devices are free to define device-specific registers with device-specific behavior (many do). Given that, it is quite possible for a device to implement a register that takes action when read (e.g. resets to 0 or clears status bits, etc.). pciconf -l itself does not require RDWR permissions, only -c which does a good bit more work. -- John Baldwin _______________________________________________ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"