Re: [RFC PATCH] ntp: Avoid undefined behaviour in second_overflow()

2019-03-06 Thread Richard Cochran
On Wed, Mar 06, 2019 at 02:37:21PM +0100, Arnd Bergmann wrote: > > There is also y2070 (many RTCs), y2100 (some other RTCs, especially > those that assume it's a leap year), and y2106. That's okay, Arnd. When the time comes you can come out of retirement and cash in, doing Y2.07, Y2.1, and Y2.10

Re: [RFC PATCH] ntp: Avoid undefined behaviour in second_overflow()

2019-03-06 Thread Arnd Bergmann
On Wed, Mar 6, 2019 at 1:29 PM Thomas Gleixner wrote: > On Wed, 6 Mar 2019, Miroslav Lichvar wrote: > > On Tue, Mar 05, 2019 at 05:42:25PM -0800, John Stultz wrote: > So once Arnd is done with y2038, we'll ask him to look into y2262 :) There is also y2070 (many RTCs), y2100 (some other RTCs, esp

Re: [RFC PATCH] ntp: Avoid undefined behaviour in second_overflow()

2019-03-06 Thread Thomas Gleixner
On Wed, 6 Mar 2019, Miroslav Lichvar wrote: > On Tue, Mar 05, 2019 at 05:42:25PM -0800, John Stultz wrote: > > > --- a/kernel/time/ntp.c > > > +++ b/kernel/time/ntp.c > > > @@ -677,6 +677,8 @@ static inline void process_adjtimex_modes(const > > > struct timex *txc, s32 *time_tai > > > > > >

Re: [RFC PATCH] ntp: Avoid undefined behaviour in second_overflow()

2019-03-06 Thread Miroslav Lichvar
On Tue, Mar 05, 2019 at 05:42:25PM -0800, John Stultz wrote: > > --- a/kernel/time/ntp.c > > +++ b/kernel/time/ntp.c > > @@ -677,6 +677,8 @@ static inline void process_adjtimex_modes(const struct > > timex *txc, s32 *time_tai > > > > if (txc->modes & ADJ_MAXERROR) > > time_

Re: [RFC PATCH] ntp: Avoid undefined behaviour in second_overflow()

2019-03-05 Thread John Stultz
p_stack.c:77 [inline] > dump_stack+0xca/0x13e lib/dump_stack.c:113 > ubsan_epilogue+0xe/0x81 lib/ubsan.c:159 > handle_overflow+0x193/0x1e2 lib/ubsan.c:190 > second_overflow+0x403/0x540 kernel/time/ntp.c:457 > accumulate_nsecs_to_secs kernel/time/timekeeping.c:2002 [inline] >

[RFC PATCH] ntp: Avoid undefined behaviour in second_overflow()

2019-03-05 Thread Xiongfeng Wang
e_overflow+0x193/0x1e2 lib/ubsan.c:190 second_overflow+0x403/0x540 kernel/time/ntp.c:457 accumulate_nsecs_to_secs kernel/time/timekeeping.c:2002 [inline] logarithmic_accumulation kernel/time/timekeeping.c:2046 [inline] timekeeping_advance+0x2bb/0xec0 kernel/time/timekeeping.c:2114 tick_do_update

second_overflow

2005-08-19 Thread smiling_23
Hi, I am trying to understand the timer adjustment calculation in Linuxkernel 2.6.12.5. How the time_adj is going to effect the change in HZ. For example if i modified the HZ to 2000. Then what will hapen to the time_adj. is there any separate calculation of time_adj is required for HZ 2000

[RFC][PATCH - 8/13] NTP cleanup: Integrate second_overflow() logic

2005-08-10 Thread john stultz
All This patch removes the second_overflow() logic integrating it into the ntp_advance() function. This provides a single interface to advance the internal NTP state machine. Any comments or feedback would be greatly appreciated. thanks -john linux-2.6.13-rc6_timeofday-ntp-part8_B5

[RFC][PATCH - 8/12] NTP cleanup: Integrate second_overflow() logic

2005-07-15 Thread john stultz
All, This patch removes the second_overflow() logic integrating it into the ntp_advance() function. This provides a single interface to advance the internal NTP state machine. Any comments or feedback would be greatly appreciated. thanks -john linux-2.6.13-rc3_timeofday-ntp-part8_B4