lkml.org 
[lkml]   [2009]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Bug: Status/Summary of slashdot leap-second crash on new years 2008-2009
Alan Cox wrote:
>>> The RTC stores the CMOS time in MM DD YY HH:MM:SS format.
>>>
>> Yes, which is perfect for mktime(), which knows about leap seconds and
>> so produces the correct time_t.
>>
>
> mktime in the kernel has no knowledge of leap seconds whatsoever. Go read
> kernel/time.c
>
Is there a mktime() in the kernel? Isn't it pure user-space? Mktime
does appear to know all about leap seconds (assuming they're in zoneinfo.)


>> different understanding. I thought it was said that there's kernel
>> support to handle the leap second flag in NTP's broadcasts, and that
>> that was where the bug was.
>>
>
> All the kernel knows how to do is to slew time (in general) and to repeat
> or remove one second. It has no knowledge of leap seconds and it doesn't
> know how to convert between UTC/TAI/Unix Epoch etc.

I went back to the start of the thread. Chris posted a stack trace
showing "#15 0xffffffff8104ec16 in ntp_leap_second (timer=<value
optimized out>) at kernel/time/ntp.c:143". That would be kernel code to
process leap seconds from NTP broadcasts, I think. That code needs to
be removed.


\
 
 \ /
  Last update: 2009-01-07 15:39    [W:0.267 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site