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: <512804E9.1010408@linaro.org>
Date:	Fri, 22 Feb 2013 15:53:13 -0800
From:	John Stultz <john.stultz@...aro.org>
To:	Thomas Gleixner <tglx@...utronix.de>
CC:	LKML <linux-kernel@...r.kernel.org>, Ingo Molnar <mingo@...e.hu>,
	Peter Zijlstra <peterz@...radead.org>,
	Eric Dumazet <dada1@...mosbay.com>,
	Frederic Weisbecker <fweisbec@...il.com>
Subject: Re: [RFC patch 7/8] timekeeping: Implement a shadow timekeeper

On 02/21/2013 02:51 PM, Thomas Gleixner wrote:
> Use the shadow timekeeper to do the update_wall_time() adjustments and
> then copy it over to the real timekeeper.
>
> Keep the shadow timekeeper in sync when updating stuff outside of
> update_wall_time().
>
> This allows us to limit the timekeeper_seq hold time to the update of
> the real timekeeper and the vsyscall data in the next patch.
>
> Signed-off-by: Thomas Gleixner<tglx@...utronix.de>
> ---

So up to here it all looks ok to me (and not so different from my 
earlier attempts at the same).

The only gotcha here that I realized with my earlier patches, is that in 
order to do the shadow copy update properly, we are also going to need 
to merge the NTP state data into the timekeeper. Otherwise, we could run 
into odd cases where as we update the shadow copy, we change the NTP 
state which then would affect the non-shadow timekeeping state that is 
about to be updated. One example: A the leap second lands, and the tai 
offset gets bumped in the ntp state, while we do a similar counter 
adjustment to the shadow-copy. Then before the real/active timekeeper is 
updated, someone gets the tai offset and applies it to that pre-update 
timekeeper state, and gets an invalid tai time.

The down side is that the NTP state data is fairly large, and so adding 
it to the timekeeper will cause the memcopys to be a bit more painful.

I'm looking at the NTP code now to try to see if we can bound where the 
NTP state is accessed, so we can maybe thin out what ntp state is linked 
to timekeeper updates, and only move that data over to the timekeeper.

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