[ntp:hackers] Time constant too large?

David L. Mills mills at udel.edu
Sat Jan 5 00:06:48 UTC 2008


Kart,

The flag days of previous versions 10 and 15 years ago, although it took 
some time for the FreeBSD and Linux to upgrade to version 3. I would 
think your upgrade path would be to upgrade those old kernels to 
something newer than 10 years ago first.

It has always been my assumption that the header files need to match 
both the operating system and version. When a new verison comes out it 
is always safe to upgrade from there using the timex.h file from that 
version. If I understand your mission, you would like to build in a 
version 3 environment and autodetect previous versions. That won't work, 
as the ntp_gettime() structure is longer in version 3 than previous 
versions and there is no way to detect other than inspecting the 
structues defined in the current timex.h. Version 3 will probably crash 
in previous versions.

Dave

Kurt Roeckx wrote:

> On Fri, Jan 04, 2008 at 03:43:41PM +0000, David L. Mills wrote:
>
>> Kurt,
>>
>> The problem is that there are three historic versions going back to
>> 1993. You can bet if the correct version was not detected now or in the
>> past 15 years, I would hear about it. The only reliable detector is the
>> timex.h defines. Bottom line with this and many other compatibility
>> issues, always compile on the machine you run on or clone. That's what
>> autoconfigure is for. For instance, past and current Solaris is version
>> 1 and current FreeBSD is version 3. Betcha some earlier version of
>> FreeBSD and/or Linux is version 2.
>>
>> Dave
>
>
>
> Dave,
>
> My problem is that I can't have any guarantee that the headers I build
> against will have any relation to the kernel the user that runs that
> binary will be using. Which basicly means I don't have an "upgrade
> path" and am forced to compile it so ntpd thinks I'm using version 2,
> even if the kernel is really running version 3. The kernel with
> version 3 supports both modes of operations, the ntpd doesn't.
>
> What I would like to do is compile it against the headers for version 3
> and have runtime detection to see what version is running.
>
> You describe in nanokernel/html/changes.htm under "Legacy Issues"
> how this should work. But then the code to actually do this is
> removed from the daemon.
>
>
> Kurt
>
>
>> Kurt Roeckx wrote:
>>
>>> On Fri, Jan 04, 2008 at 03:36:18PM +0100, Kurt Roeckx wrote:
>>>
>>>> On Fri, Jan 04, 2008 at 12:53:55AM +0000, David L. Mills wrote:
>>>>
>>>>> The nanokernel is detectedby the the presence of STA_NANO in the
>>>>> timex.h
>>>>> header file; the TAI member is detected by the presence of NTP_API 
>>>>> with
>>>>> value 4. If ntpd was built on a machine with timex.h and run on 
>>>>> another
>>>>> with an incompatible timex.h, strange things could happen.
>>>>
>>>> There used to be code that properly detected this at runtime. But some
>>>> people said there was a bug in it so they removed it. See:
>>>> https://support.ntp.org/bugs/show_bug.cgi?id=888
>>>
>>>
>>> To be more clear. There used to be a bug in some ntpd-dev version
>>> that when setting the TAI turned off MOD_PLL and as result the kernel
>>> turned off MOD_NANO. Someone thought this was just a bug in the kernel
>>> turning it off and then removed the whole code to check for MOD_NANO
>>> while there was nothing wrong with it.
>>>
>>>
>>> Kurt
>>>
>> _______________________________________________
>> hackers mailing list
>> hackers at lists.ntp.org
>> https://lists.ntp.org/mailman/listinfo/hackers
>



More information about the hackers mailing list