Re: [PATCH] iio: misc: add a generic regulator driver
From: Linus Walleij
Date: Wed Dec 28 2016 - 08:08:11 EST
On Fri, Dec 23, 2016 at 12:35 PM, Lars-Peter Clausen <lars@xxxxxxxxxx> wrote:
> On 12/23/2016 11:00 AM, Geert Uytterhoeven wrote:
> Well, it is a policy question. Who gets access to what. Right now it is all
> or nothing, a privileged application gets access to all devices/GPIOs, a
> unprivileged application gets access to nothing. Same for GPIOs as well as
> IIO devices.
> iiod at the moment does not have any access control at all, which in itself
> is a problem. We need to add support for that at some point. I don't see an
> issue with implementing a finer grained access scheme when we do so. E.g.
> unprivileged applications only get access to certain pins.
I don't know why this is percieved as such a big practical problem.
It seems to me as more of a theoretical exploit path than a practical one.
(Famous last words...)
We have per-device and not per-line GPIO access restrictions.
can all have per-device access restrictions.
This is no different from /dev/sda for example. You do not have
per-sector control of the block device, because it doesn't make sense.
Either you access all of the device, or nothing.
The same goes for IIO devices.
This pattern is very clear. You get access to a whole device or none
As with disks and IIO devices, if you want more granular access
restrictions, that is policy, and should reside in userspace.