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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <502E74B9.8010300@linaro.org>
Date:	Fri, 17 Aug 2012 09:43:37 -0700
From:	John Stultz <john.stultz@...aro.org>
To:	Herton Ronaldo Krzesinski <herton.krzesinski@...onical.com>
CC:	Paul Gortmaker <paul.gortmaker@...driver.com>,
	stable@...r.kernel.org, linux-kernel@...r.kernel.org,
	Sasha Levin <levinsasha928@...il.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Prarit Bhargava <prarit@...hat.com>, Willy Tarreau <w@....eu>,
	Richard Cochran <richardcochran@...il.com>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Ingo Molnar <mingo@...nel.org>,
	Ben Hutchings <ben@...adent.org.uk>
Subject: Re: [v2.6.34-stable 109/165] ntp: Fix leap-second hrtimer livelock

On 08/17/2012 09:17 AM, Herton Ronaldo Krzesinski wrote:
> On Wed, Aug 15, 2012 at 03:47:33PM -0400, Paul Gortmaker wrote:
>> From: John Stultz <john.stultz@...aro.org>
>>
>>                     -------------------
>>      This is a commit scheduled for the next v2.6.34 longterm release.
>>      http://git.kernel.org/?p=linux/kernel/git/paulg/longterm-queue-2.6.34.git
>>      If you see a problem with using this for longterm, please comment.
>>                     -------------------
>>
>> commit 6b43ae8a619d17c4935c3320d2ef9e92bdeed05d upstream.
>>
>> This should have been backported when it was commited, but I
>> mistook the problem as requiring the ntp_lock changes
>> that landed in 3.4 in order for it to occur.
>>
>> Unfortunately the same issue can happen (with only one cpu)
>> as follows:
>> do_adjtimex()
>>   write_seqlock_irq(&xtime_lock);
>>    process_adjtimex_modes()
>>     process_adj_status()
>>      ntp_start_leap_timer()
>>       hrtimer_start()
>>        hrtimer_reprogram()
>>         tick_program_event()
>>          clockevents_program_event()
>>           ktime_get()
>>            seq = req_seqbegin(xtime_lock); [DEADLOCK]
>>
>> This deadlock will no always occur, as it requires the
>> leap_timer to force a hrtimer_reprogram which only happens
>> if its set and there's no sooner timer to expire.
> [...]
>
> I remember this came through the leapsecond deadlock & hrtimer/futex
> issue fixes. But I noted now commit 6b1859dba01c7d512b72d77e3fd7da8354235189
> ("ntp: Fix STA_INS/DEL clearing bug") was not included, and its changelog
> says it fixes a problem introduced with this. Wouldn't it be worth/right to
> also include it in 2.6.34? I didn't test etc., just detected through the
> changelog/description but would expect it would be affected too. I also
> noted it is missing from 3.2.y and 2.6.32.y stables, and perhaps should be
> scheduled for inclusion in their cases too.

Yes. I also have another change pending in -tip that I've marked for 
stable. Once that lands I'm planning on reviewing the current stable 
trees to check that they have all the needed changes.

thanks
-john

--
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