Re: Permissions for GPIOs [Was: [PATCH] gpio: document how to order GPIO controllers]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 6, 2016 at 4:12 PM, Jan Lübbe <jlu@xxxxxxxxxxxxxx> wrote:

> This discussion caused me remember a concern regarding the chardev
> interface: Is it still be possible to give specific users/groups access
> to individual GPIOs? This is currently possible in the sysfs interface
> with chown/chmod. I don't see how per-GPIO permissions would translate
> to a per-gpiochip device.

It is not possible because it is a different model. The /dev/gpiochipN
is similar to /dev/sda for example, either you access the whole device
file not parts of it.

I think the old sysfs wrongly gives people the impression that this is
needed just because it happens to have one value per file, I can't think
of a usecase for it.

It's a bit like if we had a sysfs or similar that could give you write
permissions to just certain blocks of a disk or something using chmod.
I don't see anyone needing that other than in theory.

> Am I overlooking some better way to give non-root users granular access
> to GPIOs? Or is that intentionally out of scope for the chardev
> interface?

Intentionally out of scope I don't know, nobody raised it during review,
and I have never seen a real-world usecase.

Are there any distributions out there that ship with something like udev
files that actually go to the trouble of setting up different permissions
on GPIO sysfs files, or are we talking about hacks in a lab or even
just theoretical issues?

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux