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:   Sun, 13 Nov 2016 21:45:25 +0100
From:   Pavel Machek <pavel@....cz>
To:     Hans de Goede <hdegoede@...hat.com>
Cc:     Jacek Anaszewski <jacek.anaszewski@...il.com>,
        Tony Lindgren <tony@...mide.com>,
        Jacek Anaszewski <j.anaszewski@...sung.com>,
        linux-leds@...r.kernel.org, linux-omap@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        Darren Hart <dvhart@...radead.org>
Subject: Re: Three different LED brightnesses (was Re: PM regression with LED
 changes in next-20161109)

Hi!

> >No, that's just adding more mess on the system.
> >
> >Here's better proposal:
> >
> >brightness (write): what we do today. (Mess, but too late to change it)
> >	   (read): -Esomething or what we do today (if someone
> >	   	   	       	       	  	   acutally uses it)
> 
> As said Jacek has already nacked any changes to read behavior.
> 
> >           (poll): -Esomething
> 
> Making poll() on sysfs attributes return -Esomething is not possible,
> the internal sysfs API does not allow this.
> 
> >current_brightness (write): -Esomething, or maybe change brightness
> >		   for triggers that can work with that
> >              (read, poll): if the current trigger can get current
> >	             state of led, do it, otherwise -Esomething...
> >		     or maybe file should be simply hidden from sysfs.
> 
> So write is -EINVAL and read is the same as what brightness currently does,
> so I see no use in introducing this new file.

No, read is not same as current brightness file. Currently, reading
brightness file returns either current brightness or maximum
brightness, and userspace can't tell which is which.

> >trigger_max_brightness (read,write): change the maximum brightness for
> >		       a trigger.
> >	       (poll): -Esomething
> 
> The write behavior here is the same as what brightness currently does
> and the read behavior is that of what I suggested for

No, it is not. "brightness" behaviour is currently broken, as it sets
either current brightness or maximum trigger brightness.

> We've 2 sorts of brightness really:
> 
> 1) transient brightness, aka current brightness, when blinking or
> triggers are used this will switch many times a second
> between off and some on level.
> 
> 2) non-transient brightness, for non blinking leds this is the
> actual brightness, for blinking leds this is the brightness
> level used when the led is on.

Yes, and we want reasonable interface where userspace sees those two
brightnesses.

									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