[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.20.1612020004090.3666@nanos>
Date: Fri, 2 Dec 2016 00:08:21 +0100 (CET)
From: Thomas Gleixner <tglx@...utronix.de>
To: John Stultz <john.stultz@...aro.org>
cc: David Gibson <david@...son.dropbear.id.au>,
lkml <linux-kernel@...r.kernel.org>,
Liav Rehana <liavr@...lanox.com>,
Chris Metcalf <cmetcalf@...lanox.com>,
Richard Cochran <richardcochran@...il.com>,
Ingo Molnar <mingo@...nel.org>,
Prarit Bhargava <prarit@...hat.com>,
Laurent Vivier <lvivier@...hat.com>,
"Christopher S . Hall" <christopher.s.hall@...el.com>,
"4.6+" <stable@...r.kernel.org>,
Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH] timekeeping: Change type of nsec variable to unsigned
in its calculation.
On Thu, 1 Dec 2016, John Stultz wrote:
> Yes, you're right here and apologies, as I wasn't being precise. In
> this case time does go backward, but its limited to within the current
> interval (just as it would be with a narrow clocksource wrapping
> fully). But without this patch, when the overflow occurs, if the
> signed bit is set, the signed shift pulls the sign bits down, the time
> can go backwards far beyond the current interval, which causes major
> wreckage.
Backwards is backwards, no matter how much. Depending on the computation
which sees the timejump you can end up with major crap as well. Think NTP,
PTP, PPS or whatever is able to tweak timekeeping in really bad ways.
Thanks,
tglx
Powered by blists - more mailing lists