lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 22 Feb 2017 21:54:08 +0100
From:   Pavel Machek <pavel@....cz>
To:     Pali Rohár <pali.rohar@...il.com>
Cc:     Richard Purdie <rpurdie@...ys.net>,
        Jacek Anaszewski <jacek.anaszewski@...il.com>,
        linux-leds@...r.kernel.org, linux-kernel@...r.kernel.org,
        Darren Hart <dvhart@...radead.org>,
        platform-driver-x86@...r.kernel.org
Subject: Re: LED devices & poll() for brightness attribute

On Wed 2017-02-22 13:39:29, Pali Rohár wrote:
> On Wednesday 22 February 2017 13:25:57 Pavel Machek wrote:
> > Hi!
> > 
> > > But this support is useful just for one single central userspace
> > > application which will control all leds in system other application
> > > which will change state by /sys/class/leds/ will de-synchronize that one
> > > central application.

Actually this is wrong.

> > Yes. Does it matter for some real use case?
> 
> Yes. E.g. systemd has already some support for changing leds. And I do
> not want to be forced to use systemd (or any other specific application)
> just because it already controls leds.

So... you don't want to use systemd, so don't use systemd. What is the
problem? :-)

> And my own application for controlling leds should know current state of
> them if it is possible.

If you have at most one application controlling each LED, you are
fine. That's quite common situation, serial port can also be opened at
most once. Do you actually have two applications accessing one led? If
so, what applications?

> > > So I think new ABI is not sufficient and I would propose to add poll()
> > > support also for changes done by userspace, write() to attribute
> > > /sys/class/leds/.../brightness.
> > 
> > Not easily possible, as we have triggers, and this was discussed in
> > great great lengths before. Please go through that discussion.
> 
> Without triggers and blinking it should be possible.
> 
> Just notify only when some application do echo > brightness.

Yes, we _could_ do that. Would be slightly confusing
w.r.t. triggers. But is it good idea?

Userspace could easily keep /var/run/led/XXX/brightness, and inotify
works over regular files..

And yes, with three color LEDs, userspace daemon managing LED state
will be pretty much mandatory...

									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ