Re: [PATCH] Fix clock_gettime vsyscall time warp

From: Martin Schwidefsky
Date: Tue Nov 17 2009 - 04:00:01 EST


On Tue, 17 Nov 2009 13:49:50 +0800
Lin Ming <ming.m.lin@xxxxxxxxx> wrote:

> The root cause is the NTP adjusted clock multiplier(timekeeper.mult) is
> not updated to vsyscall gtod data(vsyscall_gtod_data.clock.mult).
>
> Since commit 0a544198 "timekeeping: Move NTP adjusted clock multiplier
> to struct timekeeper", clock->mult is only the unmodified multiplier.
>
> Below patch passes the adjusted clock multiplier to update_vsyscall.
> -void update_vsyscall(struct timespec *wall_time, struct clocksource *clock)
> +void update_vsyscall(struct timespec *wall_time, struct clocksource *clock, u32 mult)
>
> With this patch applied to 2.6.32-rc7, I have been running
> time-warp-test for many hours without any time warp on both x86_64 and
> ia64 machines.
>
> This patch also touches the powerpc code, so it would be very
> appreciated if anyone can help to test it on powerpc.

Ouch! Yes, good catch. That patch needs to go into 2.6.32.

--
blue skies,
Martin.

"Reality continues to ruin my life." - Calvin.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/