New Proposal for Seamless Time-sync after Suspend-Resume

Information

ID: 385
PHID: PHID-TASK-dpy2ikajfp3lmslgvrly
Author: HulaHoop
Status at Migration Time: open
Priority at Migration Time: Normal

Description

More testing was done, inspired by the information here: virtualization - How to keep time on resumed KVM guest with libvirt? - Server Fault

If date command sets system time during a session it will be honored even after a system-resume meaning sdwdate’s time will stay the same even after resume with kvmclock available. If date command is never run during a session, the kvm-clock hwclock automatically adjusts system time after resume. kvm-clock always keeps up with host time. Running “sudo hwclock” confirms this.

Given this information, to make sdwdate work with hwclock (kvm-clock) it must monitor the difference between date command output and hwclock. Just like the loop check mechanism in the other ticket. If it exceeds certain delta time it would synchronize the system time to match that of hwclock with command:

sudo hwclock --hctosys

The running of timesync on WS would be slightly delayed (for 30s) to give time for sdwdate GW to set a baseline time from hwclock to allow Tor to connect.

Advantages of this ticket:

  • No extra packages needed
  • No security tradeoffs cased by guest-agents
  • No intervm signalling needed
  • Works in both GW and WS

It is safe to enable kvmclock because it doesn’t interfere with the time set by sdwdate. We already decided in the threat model discussed in: Time Attacks - Whonix that even without giving access to kvmclock timesync cannot protect against active attacks by an adversary inside the WS.

To enable kvmclock the settings need to be reverted to:

and whonixcheck should disable its kvm-clock warning.

Comments


Patrick

2015-07-29 19:17:06 UTC


HulaHoop

2015-07-29 19:20:45 UTC


Patrick

2015-07-29 19:35:03 UTC


HulaHoop

2015-07-29 19:41:20 UTC


Patrick

2015-07-29 21:53:54 UTC


HulaHoop

2015-08-04 15:52:23 UTC


Patrick

2015-08-04 21:14:05 UTC


Patrick

2015-08-04 21:15:18 UTC


HulaHoop

2015-12-16 21:40:37 UTC


Patrick

2015-12-17 20:01:49 UTC


HulaHoop

2015-12-18 17:02:31 UTC


Patrick

2015-12-19 20:03:01 UTC


HulaHoop

2015-12-20 18:33:32 UTC


Patrick

2015-12-21 11:46:55 UTC


HulaHoop

2015-12-21 21:50:46 UTC


Patrick

2015-12-21 22:00:20 UTC


Patrick

2015-12-21 22:06:14 UTC


Patrick

2015-12-22 01:31:48 UTC


Patrick

2016-04-27 20:48:52 UTC


Patrick

2016-08-23 19:53:20 UTC