Message ID | 20200218151812.7816-1-geert+renesas@glider.be (mailing list archive) |
---|---|
Headers | show |
Series | gpio: Add GPIO Aggregator | expand |
Hi Geert, On Tue, Feb 18, 2020 at 04:18:07PM +0100, Geert Uytterhoeven wrote: > Hi all, > > GPIO controllers are exported to userspace using /dev/gpiochip* > character devices. Access control to these devices is provided by > standard UNIX file system permissions, on an all-or-nothing basis: > either a GPIO controller is accessible for a user, or it is not. > Currently no mechanism exists to control access to individual GPIOs. > > Hence this adds a GPIO driver to aggregate existing GPIOs, and expose > them as a new gpiochip. This is useful for implementing access control, > and assigning a set of GPIOs to a specific user. Furthermore, this > simplifies and hardens exporting GPIOs to a virtual machine, as the VM > can just grab the full GPIO controller, and no longer needs to care > about which GPIOs to grab and which not, reducing the attack surface. > > Recently, other use cases have been discovered[1]: > - Describing simple GPIO-operated devices in DT, and using the GPIO > Aggregator as a generic GPIO driver for userspace, which is useful > for industrial control. > > Changes compared to v4[2]: > - Add Reviewed-by, Tested-by, > - Fix inconsistent indentation in documentation. I confirm that the diff between v4 and v5 comprises whitespace only. Thanks for your time to develop this useful functionality!
Hi Linus and Bartosz, On Tue, Feb 18, 2020 at 4:18 PM Geert Uytterhoeven <geert+renesas@glider.be> wrote: > GPIO controllers are exported to userspace using /dev/gpiochip* > character devices. Access control to these devices is provided by > standard UNIX file system permissions, on an all-or-nothing basis: > either a GPIO controller is accessible for a user, or it is not. > Currently no mechanism exists to control access to individual GPIOs. > > Hence this adds a GPIO driver to aggregate existing GPIOs, and expose > them as a new gpiochip. This is useful for implementing access control, > and assigning a set of GPIOs to a specific user. Furthermore, this > simplifies and hardens exporting GPIOs to a virtual machine, as the VM > can just grab the full GPIO controller, and no longer needs to care > about which GPIOs to grab and which not, reducing the attack surface. Do you have any more comments, before I respin and post v6? Thanks, and have a niec weekend! Gr{oetje,eeting}s, Geert