Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1526236

Re: [patch 4/8] x86/tsc: Verify TSC_ADJUST from idle

From Peter Zijlstra <peterz@infradead.org>
Newsgroups linux.kernel
Subject Re: [patch 4/8] x86/tsc: Verify TSC_ADJUST from idle
Date 2016-11-20 14:20 +0100
Message-ID <sFAci-2Z1-9@gated-at.bofh.it> (permalink)
References <sFelr-5AY-3@gated-at.bofh.it> <sFelr-5AY-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[patch 0/8] x86/tsc: Utilize TSC_ADJUST MSR Thomas Gleixner <tglx@linutronix.de> - 2016-11-19 15:00 +0100
  [patch 4/8] x86/tsc: Verify TSC_ADJUST from idle Thomas Gleixner <tglx@linutronix.de> - 2016-11-19 15:00 +0100
    Re: [patch 4/8] x86/tsc: Verify TSC_ADJUST from idle Peter Zijlstra <peterz@infradead.org> - 2016-11-20 14:20 +0100
      Re: [patch 4/8] x86/tsc: Verify TSC_ADJUST from idle Thomas Gleixner <tglx@linutronix.de> - 2016-11-21 09:20 +0100
        Re: [patch 4/8] x86/tsc: Verify TSC_ADJUST from idle Peter Zijlstra <peterz@infradead.org> - 2016-11-21 12:10 +0100
    Re: [patch 4/8] x86/tsc: Verify TSC_ADJUST from idle Andi Kleen <andi@firstfloor.org> - 2016-11-22 00:00 +0100
  [patch 5/8] x86/tsc: Sync test only for the first cpu in a package Thomas Gleixner <tglx@linutronix.de> - 2016-11-19 15:00 +0100
  [patch 3/8] x86/tsc: Store and check TSC ADJUST MSR Thomas Gleixner <tglx@linutronix.de> - 2016-11-19 15:00 +0100
  [patch 1/8] x86/tsc: Use X86_FEATURE_TSC_ADJUST in detect_art() Thomas Gleixner <tglx@linutronix.de> - 2016-11-19 15:00 +0100
  [patch 2/8] x86/tsc: Detect random warps Thomas Gleixner <tglx@linutronix.de> - 2016-11-19 15:00 +0100
  [patch 7/8] x86/tsc: Prepare warp test for TSC adjustment Thomas Gleixner <tglx@linutronix.de> - 2016-11-19 15:00 +0100

csiph-web