Re: [PATCH] lib/vdso: use CLOCK_REALTIME_COARSE for time()

2020-06-11 Thread Mark Salyzyn
On Jun 11, 2020, at 12:34 PM, Thomas Gleixner wrote: > > Mark Salyzyn writes: >> From: Chiawei Wang >> >> CLOCK_REALTIME in vdso data won't be updated if >> __arch_use_vsyscall() returns false. > > Errm! > > # git grep __arch_use_vsyscall > # > > Aside of that update_vsyscall() updates CLOC

Re: [PATCH] lib/vdso: use CLOCK_REALTIME_COARSE for time()

2020-06-11 Thread Thomas Gleixner
Mark Salyzyn writes: > From: Chiawei Wang > > CLOCK_REALTIME in vdso data won't be updated if > __arch_use_vsyscall() returns false. Errm! # git grep __arch_use_vsyscall # Aside of that update_vsyscall() updates CLOCK_REALTIME data unconditionally. No idea what this patch is solving. > Cc: st

[PATCH] lib/vdso: use CLOCK_REALTIME_COARSE for time()

2020-06-11 Thread Mark Salyzyn
From: Chiawei Wang CLOCK_REALTIME in vdso data won't be updated if __arch_use_vsyscall() returns false. It will let time() return an incorrect time value. Since time() is designed to return the seconds since the Epoch, using CLOCK_REALTIME_COARSE can still fulfill the request and never fails. Si