Re: Exposing ROM's though sysfs

Jesse Barnes
2004-07-30T20:27:11Z

On Friday, July 30, 2004 1:13 pm, Martin Mares wrote:
> > Do I understand it correctly that the ROM-in-sysfs hack is intended only
> > for debugging? If it is so, I do not see why we should do anything
> > complicated in order to avoid root shooting himself in the foot.
>
> ... for which the config space access code already sets the precedent --
> there exist (rare) devices which have configuration registers with side
> effects on reads, making it possible to produce SCSI errors or even crash
> the system by just dumping the config space. Even on these devices, the
> kernel does not attempt to forbid reading of these registers via sysfs.

Well, this is what I initially argued with willy...

I think typical usage will be:
o dri fires off hotplug event
o userland card POSTing tool reads the ROM, saving it off for future use,
and POSTs the card
o userland tool calls back into dri saying that the card is ready
o dri driver operates happily

So dealing with users accessing the rom file after a driver is up and running
may not be worth the trouble.

Jesse