1*2b15cb3dSCy Schubert Bug Id: 4095849 2*2b15cb3dSCy Schubert Category: kernel 3*2b15cb3dSCy Schubert Subcategory: syscall 4*2b15cb3dSCy Schubert State: evaluated 5*2b15cb3dSCy Schubert Synopsis: time_constant value >6 with PLL in use leads to integer divide 6*2b15cb3dSCy Schubert zero trap panic 7*2b15cb3dSCy Schubert Description: 8*2b15cb3dSCy SchubertIf the time_constant parameter is 7 or higher, and the phase-lock looping model 9*2b15cb3dSCy Schubertis in use, the system will take a "integer divide zero trap" panic in 10*2b15cb3dSCy Schubertthe clock routine as soon as the time_offset becomes non-zero. 11*2b15cb3dSCy Schubert 12*2b15cb3dSCy Schuberttime_constant defaults to 0. The only place it is set is in the ntp_adjtime 13*2b15cb3dSCy Schubertsystem call, from the 'constant' element of the timex structure argument. 14*2b15cb3dSCy Schubert 15*2b15cb3dSCy Schubert Work around: 16*2b15cb3dSCy SchubertNever set the constant element of the timex structure passed to ntp_adjtime to 17*2b15cb3dSCy Schuberta value larger than 6. 18*2b15cb3dSCy Schubert 19*2b15cb3dSCy Schubertsatish.mynam@Eng 1998-04-30 20*2b15cb3dSCy Schubert1. Use Sun's version of NTP software instead of PD version. This problem 21*2b15cb3dSCy Schubertis not seen with Sun's NTP version (which is mostly eqivalent to PD NTP 3.4 22*2b15cb3dSCy Schubertplus some Sun's local functionality futures). 23*2b15cb3dSCy Schubert 24*2b15cb3dSCy Schubert2. Workaround for the public domain NTP version ONLY: 25*2b15cb3dSCy Schubert ===================================================== 26*2b15cb3dSCy SchubertThe workaround for public domain NTP version is to disable the 27*2b15cb3dSCy SchubertKERNEL_PLL from the NTP code. This way ntp_Adjtime() system call is 28*2b15cb3dSCy Schuberttotally bypassed without sacrificing any of the functionality of the 29*2b15cb3dSCy SchubertNTP. The only hit you might see is the way kernel precision timminig 30*2b15cb3dSCy Schubertis done without the PLL algorithm in the kernel. 31*2b15cb3dSCy Schubert 32*2b15cb3dSCy Schubert The easiest way to disable ntp_adjtime option is(without changing 33*2b15cb3dSCy Schubert any makefiles or other config files) to disable the KERNEL_PLL 34*2b15cb3dSCy Schubert value in the ./config.h file. 35*2b15cb3dSCy Schubert 36*2b15cb3dSCy SchubertAfter doing a ./configure for probing for all the necessary tools(compilers, 37*2b15cb3dSCy Schubertos version, libraries), please comment out KERNEL_PLL macro in 38*2b15cb3dSCy Schubertthe ./config.h file. This will disable the KERNEL_PLL part of the source 39*2b15cb3dSCy Schubertcode and the newly obtained xntpd is just similar to the old one but it 40*2b15cb3dSCy Schubertdoes not use ntp_adjtime() system call. This prevents it from panic'ng 41*2b15cb3dSCy Schubertthe kernel. 42*2b15cb3dSCy Schubert 43*2b15cb3dSCy Schubert/*#define KERNEL_PLL 1*/ 44*2b15cb3dSCy Schubert 45*2b15cb3dSCy SchubertI complied a new xntpd binary this way and it does nothave any ntp_adjtime() 46*2b15cb3dSCy Schubertrelated stuff. 47*2b15cb3dSCy Schubert 48*2b15cb3dSCy SchubertDefault: 49*2b15cb3dSCy Schubert======= 50*2b15cb3dSCy Schubert/net/divya/export/home/mynam/public_domain/ntp/xntp3-5.92/xntpd>strings 51*2b15cb3dSCy Schubertxntpd | 52*2b15cb3dSCy Schubertgrep ntp_adjtime 53*2b15cb3dSCy Schubert354:adj_frequency: ntp_adjtime failed: %m 54*2b15cb3dSCy Schubert357:loop_config: ntp_adjtime() failed: %m 55*2b15cb3dSCy Schubert435:get_kernel_info: ntp_adjtime() failed: %m 56*2b15cb3dSCy Schubert 57*2b15cb3dSCy SchubertWith KERNEL_PLL disabled in config.h file 58*2b15cb3dSCy Schubert-======================= 59*2b15cb3dSCy Schubert 60*2b15cb3dSCy Schubert/net/divya/export/home/mynam/public_domain/ntp/xntp3-5.92/xntpd>strings 61*2b15cb3dSCy Schubertxntpd.nopll | grep ntp_adjtime 62*2b15cb3dSCy Schubert 63*2b15cb3dSCy Schubert Integrated in releases: 64*2b15cb3dSCy Schubert Duplicate of: 65*2b15cb3dSCy Schubert Patch id: 66*2b15cb3dSCy Schubert See also: 4133517 67*2b15cb3dSCy Schubert Summary: 68*2b15cb3dSCy SchubertIf the time_constant parameter is 7 or higher, and the phase-lock looping model 69*2b15cb3dSCy Schubertis in use, the system will take a "integer divide zero trap" panic in 70*2b15cb3dSCy Schubertthe clock routine as soon as the time_offset becomes non-zero. 71*2b15cb3dSCy Schubert 72*2b15cb3dSCy Schuberttime_constant defaults to 0. The only place it is set is in the ntp_adjtime 73*2b15cb3dSCy Schubertsystem call, from the 'constant' element of the timex structure argument. 74*2b15cb3dSCy Schubert---------------------------------------------------------------------------- 75