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] [day] [month] [year] [list]
Message-ID: <CAMP5XgeDWnUkmSwyXTLgsnyfh4SYQ72C1Ws-Ls85SG_cMQt2dA@mail.gmail.com>
Date:	Thu, 9 Aug 2012 16:41:26 -0700
From:	Arve Hjønnevåg <arve@...roid.com>
To:	John Stultz <john.stultz@...aro.org>
Cc:	Todd Poynor <toddpoynor@...gle.com>, linux-kernel@...r.kernel.org,
	linux-pm@...r.kernel.org
Subject: Re: [PATCH] alarmtimer: implement minimum alarm interval for allowing suspend

On Thu, Aug 9, 2012 at 2:27 PM, John Stultz <john.stultz@...aro.org> wrote:
> On 08/09/2012 12:37 AM, Todd Poynor wrote:
>>
>> alarmtimer suspend return -EBUSY if the next alarm will fire in less
>> than 2 seconds.  This allows one RTC seconds tick to occur subsequent
>> to this check before the alarm wakeup time is set, ensuring the wakeup
>> time is still in the future (assuming the RTC does not tick one more
>> second prior to setting the alarm).
>>
>> If suspend is rejected due to an imminent alarm, hold a wakeup source
>> for 2 seconds to process the alarm prior to reattempting suspend.
>>
>> If setting the alarm incurs an -ETIME for an alarm set in the past,
>> or any other problem setting the alarm, abort suspend and hold a
>> wakelock for 1 second while the alarm is allowed to be serviced or
>> other hopefully transient conditions preventing the alarm clear up.
>>
>> Signed-off-by: Todd Poynor <toddpoynor@...gle.com>
>> ---
>>   kernel/time/alarmtimer.c |   18 +++++++++++++-----
>>   1 files changed, 13 insertions(+), 5 deletions(-)
>
>
> Thanks for sending this in!
> I've gone ahead and queued it for 3.7 (with the minor tweak Rafael
> suggested). I'll try to do some further testing of the edge case this
> handles as well.
>

You may want to add a wakeupsource to the rtc_timer interface as well.
In the version of the code I have it does not look like
rtc_timer_start will ever return -ETIME. rtc_timer_enqueue swallows
that error code and schedules work instead.

-- 
Arve Hjønnevåg
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ