From 7d264ac60defd30539fc169df1d1cd14a952cfe5 Mon Sep 17 00:00:00 2001 From: Konstantin Bogomolov Date: Fri, 19 Jan 2024 14:16:53 -0800 Subject: [PATCH] Change timestamp discrepancy warnings to just print info. ARM syscall tests sometimes fail on our buildkite test runners with errors like: ``` main.go:731: test "main.test" failed with error [W0119 17:41:24.540369 38 shared_context.go:196] likely memory tampering detected: found a condition where ackedAt (1160377308938) < startWaitingTS (1160377308943)], want nil ``` Empirically, at least on our VMs `CNTVCT_EL0` is not monotonic. (We don't see these errors on AMD64 VMs). For now let's disable this warning as it's leading to unnecessary test reruns. PiperOrigin-RevId: 599935334 --- pkg/sentry/platform/systrap/shared_context.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/sentry/platform/systrap/shared_context.go b/pkg/sentry/platform/systrap/shared_context.go index 148f4c367..8ba1e79ee 100644 --- a/pkg/sentry/platform/systrap/shared_context.go +++ b/pkg/sentry/platform/systrap/shared_context.go @@ -193,7 +193,7 @@ func (sc *sharedContext) isAcked() bool { func (sc *sharedContext) getAckedTimeDiff() cpuTicks { ackedAt := atomic.LoadUint64(&sc.shared.AckedTime) if ackedAt < uint64(sc.startWaitingTS) { - log.Warningf("likely memory tampering detected: found a condition where ackedAt (%d) < startWaitingTS (%d)", ackedAt, uint64(sc.startWaitingTS)) + log.Infof("likely memory tampering detected: found a condition where ackedAt (%d) < startWaitingTS (%d)", ackedAt, uint64(sc.startWaitingTS)) return 0 } return cpuTicks(ackedAt - uint64(sc.startWaitingTS)) @@ -207,7 +207,7 @@ func (sc *sharedContext) getStateChangedTimeDiff() cpuTicks { changedAt := atomic.LoadUint64(&sc.shared.StateChangedTime) now := uint64(cputicks()) if now < changedAt { - log.Warningf("likely memory tampering detected: found a condition where now (%d) < changedAt (%d)", now, changedAt) + log.Infof("likely memory tampering detected: found a condition where now (%d) < changedAt (%d)", now, changedAt) return 0 } return cpuTicks(now - changedAt)