Re: [RFC][PATCH] timekeeping: Limit system time to prevent 32-bit time_t overflow

2015-04-16 Thread Miroslav Lichvar
On Wed, Apr 15, 2015 at 12:17:36PM -0400, Justin Keller wrote: > Is there a reason for "step = leap"? It's there to not change the behavior when a leap second occurs, the clock still needs to be stepped. I guess it could be optimized a bit, if it used "if (unlikely(leap || tk->xtime_sec >= time_ma

Re: [RFC][PATCH] timekeeping: Limit system time to prevent 32-bit time_t overflow

2015-04-16 Thread Miroslav Lichvar
On Wed, Apr 15, 2015 at 10:31:54PM +0100, One Thousand Gnomes wrote: > On Wed, 15 Apr 2015 17:41:28 +0200 > Miroslav Lichvar wrote: > > larger value. When the maximum is reached in normal time accumulation, > > the clock will be stepped back by one week. > > Which itself is open to exploits and d

Re: [RFC][PATCH] timekeeping: Limit system time to prevent 32-bit time_t overflow

2015-04-15 Thread One Thousand Gnomes
On Wed, 15 Apr 2015 17:41:28 +0200 Miroslav Lichvar wrote: > On systems with 32-bit time_t, it seems there are quite a few problems > that applications may have with time overflowing in year 2038. Beside Even ext4 is still broken for 2038. > larger value. When the maximum is reached in normal t

Re: [RFC][PATCH] timekeeping: Limit system time to prevent 32-bit time_t overflow

2015-04-15 Thread Justin Keller
Is there a reason for "step = leap"? On Wed, Apr 15, 2015 at 11:41 AM, Miroslav Lichvar wrote: > On systems with 32-bit time_t, it seems there are quite a few problems > that applications may have with time overflowing in year 2038. Beside > getting in an unexpected state by not checking integer o

Re: [RFC][PATCH] timekeeping: Limit system time to prevent 32-bit time_t overflow

2015-04-15 Thread Arnd Bergmann
On Wednesday 15 April 2015 17:41:28 Miroslav Lichvar wrote: > On systems with 32-bit time_t, it seems there are quite a few problems > that applications may have with time overflowing in year 2038. Beside > getting in an unexpected state by not checking integer operations with > time_t variables, s

[RFC][PATCH] timekeeping: Limit system time to prevent 32-bit time_t overflow

2015-04-15 Thread Miroslav Lichvar
On systems with 32-bit time_t, it seems there are quite a few problems that applications may have with time overflowing in year 2038. Beside getting in an unexpected state by not checking integer operations with time_t variables, some system calls have unexpected behavior, e.g. the system time can'