From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754829AbcKUW5P (ORCPT ); Mon, 21 Nov 2016 17:57:15 -0500 Received: from mga14.intel.com ([192.55.52.115]:55494 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753003AbcKUW5N (ORCPT ); Mon, 21 Nov 2016 17:57:13 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,677,1473145200"; d="scan'208";a="33246260" From: Andi Kleen To: Thomas Gleixner Cc: LKML , Ingo Molnar , Peter Zijlstra , x86@kernel.org, Borislav Petkov , Yinghai Lu Subject: Re: [patch 4/8] x86/tsc: Verify TSC_ADJUST from idle References: <20161119133816.633700010@linutronix.de> <20161119134017.732180441@linutronix.de> Date: Mon, 21 Nov 2016 14:57:13 -0800 In-Reply-To: <20161119134017.732180441@linutronix.de> (Thomas Gleixner's message of "Sat, 19 Nov 2016 13:47:37 -0000") Message-ID: <87k2bwxwza.fsf@tassilo.jf.intel.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thomas Gleixner writes: > When entering idle, it's a good oportunity to verify that the TSC_ADJUST > MSR has not been tampered with (BIOS hiding SMM cycles). If tampering is > detected, emit a warning and restore it to the previous value. idle entry is a time critical code path too, because idle periods are often very short. rdmsr is a us+ at least. You'll likely make workloads that do a lot of short sleeps noticeable slower. If anything load limit it aggressively. BTW I don't think this situation of SMM tampering with TSC is common anyways, so it may be simply not worth checking, or perhaps only with a debug boot option. -Andi