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

2016-11-29 Thread Ingo Molnar
* Thomas Gleixner wrote: > On Mon, 21 Nov 2016, Peter Zijlstra wrote: > > On Mon, Nov 21, 2016 at 09:16:44AM +0100, Thomas Gleixner wrote: > > > On Sun, 20 Nov 2016, Peter Zijlstra wrote: > > > > On Sat, Nov 19, 2016 at 01:47:37PM -, Thomas Gleixner wrote: > > > > > When entering idle, it's

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

2016-11-29 Thread Thomas Gleixner
On Mon, 21 Nov 2016, Peter Zijlstra wrote: > On Mon, Nov 21, 2016 at 09:16:44AM +0100, Thomas Gleixner wrote: > > On Sun, 20 Nov 2016, Peter Zijlstra wrote: > > > On Sat, Nov 19, 2016 at 01:47:37PM -, Thomas Gleixner wrote: > > > > When entering idle, it's a good oportunity to verify that the T

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

2016-11-21 Thread Andi Kleen
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

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

2016-11-21 Thread Peter Zijlstra
On Mon, Nov 21, 2016 at 09:16:44AM +0100, Thomas Gleixner wrote: > On Sun, 20 Nov 2016, Peter Zijlstra wrote: > > On Sat, Nov 19, 2016 at 01:47:37PM -, Thomas Gleixner wrote: > > > When entering idle, it's a good oportunity to verify that the TSC_ADJUST > > > MSR has not been tampered with (BIO

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

2016-11-21 Thread Thomas Gleixner
On Sun, 20 Nov 2016, Peter Zijlstra wrote: > On Sat, Nov 19, 2016 at 01:47:37PM -, 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 re

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

2016-11-20 Thread Peter Zijlstra
On Sat, Nov 19, 2016 at 01:47:37PM -, 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/k

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

2016-11-19 Thread Thomas Gleixner
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. This is especially important for machines, which mark the TSC reliable because there is n