|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] x86/time: make do_settime() uses more accurate
On 2026-05-06 11:48, Andrew Cooper wrote: On 06/05/2026 10:47 am, Andrew Cooper wrote:On 06/05/2026 10:35 am, Jan Beulich wrote:As a comment next to one of the invocations states, get_wallclock_time() can take over a second. The order of evaluation of function arguments is in principle unspecified; in practice at least gcc looks to be evaluating them from last to first. Hence with NOW() invoked first, the respectivevalue passed to do_settime() can be off by over a second (which is incontrast to __get_cmos_time() attempting to get the time exactly after anupdate, i.e. [pretty] precisely at a seconds boundary).This also addresses a Misra C:2012 rule 13.2 ("The value of an expressionand its persistent side-effects shall be the same under all permitted evaluation orders") violation each.Fixes: f64134cdb81c ("x86: Fix time_resume() to notify all domains of wallclock change") Patches welcome :) -- Nicola Vetrini, B.Sc. Software Engineer BUGSENG (https://bugseng.com) LinkedIn: https://www.linkedin.com/in/nicola-vetrini-a42471253
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |