CVSROOT:        /cvs
Module name:    src
Changes by:     [email protected] 2019/01/30 22:00:19

Modified files:
        sys/kern       : kern_tc.c 

Log message:
tc_setclock: Don't rewind the system uptime during resume/unhibernate.

When we come back from suspend/hibernate the BIOS/firmware/whatever can
hand us *any* TOD, so we need to check that the given TOD doesn't set our
boot offset backwards, breaking the monotonicity of e.g. CLOCK_MONOTONIC.
This is trivial to do from the BIOS on most PCs before unhibernating.
There might be other ways it can happen, accidentally or otherwise.

This is a bit messy but it can be made prettier later with a "bintimecmp"
macro or something like that.

Problem confirmed by jmatthew@.

"you are very likely right" deraadt@

Reply via email to