On Thu, Feb 17, 2022 at 09:23:14AM -0700, Theo de Raadt wrote: > I am terrified by existance of the userland gpio interface, basically > the concept that users should be able to change some pin is more than > suspect, it is crazy. It completely violates the Unix principle of > mapping hardware support to narrow device catagories on a functional > basis, which only the right user can use. > > The pins a user will change are usually undocumented. They could be > wired to a bomb. > > If these drivers only exposed pins which had *known function*, or which > are known to be otherwise unused (a pin on a header), that would be fine. > But that's not how it plays out usually.
I agree that the userland gpio interface has its flaws. Ignorant or malicious changing of pins can cause unwanted effects, even physical damage. I think "finished" hardware with proper software does not need the userland gpio interface. The mpfgpio(4) driver provides the interface to allow tinkering. The hardware is for DIY purposes.
