lkml.org 
[lkml]   [2016]   [Nov]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [patch 4/8] x86/tsc: Verify TSC_ADJUST from idle
On Sat, Nov 19, 2016 at 01:47:37PM -0000, Thomas Gleixner wrote:
> 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.

> +++ b/arch/x86/kernel/process.c
> @@ -277,6 +277,7 @@ void exit_idle(void)
>
> void arch_cpu_idle_enter(void)
> {
> + tsc_verify_tsc_adjust();
> local_touch_nmi();
> enter_idle();
> }

Doing a RDMSR on the idle path isn't going to be popular. That path is
already way too slow.

\
 
 \ /
  Last update: 2016-11-20 14:10    [W:0.150 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site