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:	Mon, 23 Apr 2012 15:45:46 +1000
From:	NeilBrown <neilb@...e.de>
To:	Jonas Bonn <jonas@...thpole.se>
Cc:	shuahkhan@...il.com, Andrew Morton <akpm@...ux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Richard Purdie <richard.purdie@...uxfoundation.org>
Subject: Re: [PATCH ] leds: add new transient trigger for one shot timer
 support

On Mon, 23 Apr 2012 07:29:59 +0200 Jonas Bonn <jonas@...thpole.se> wrote:

> 
> On Mon, 2012-04-23 at 11:56 +1000, NeilBrown wrote:
> > I wonder if we should allow control of the brightness during the "on" time as
> > well.
> > You could set the brightness after enabling the timer, but awkward pauses or
> > races could then leave the "led" permanently on.
> 
> echo transient > trigger
> echo 200 > duration
> echo 1 > activate
context switch - lots of IO - time passes, 200ms or more, led gets turned of
and then back to:
> echo 100 > brightness

led gets turned on and there is nothing to turn it off.

Not a likely case I agree, but not impossible.

The problem is that just setting the brightness will turn the led on
independent of the start of the trigger (unless you set the brightness to 0 -
that disables the trigger).

Thanks,
NeilBrown

> 
> Worst case, the brightness doesn't get set and you get a 'bright' LED
> until it expires... but at least it does expire!
> 
> > 
> > Possibly we could hook into led_set_brightness() and restart the timer
> > whenever the brightness was set - and remember the setting.
> 
> An easy way to do this might be to check the brightness setting at the
> time the timer expires and save this value.  Next time the LED is
> activated, we use this brightness setting instead of FULL_ON.  It would
> be nice to keep this trigger self-contained and not have to hook into
> led_set_brightness
> 
> You make interesting point about using the brightness property as the
> actual timer trigger, though.  That's pretty elegant, but it does
> require hooking into led_set_brightness.
> 
> /Jonas


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ