Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1532340
| From | Ingo Molnar <mingo@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [patch 4/8] x86/tsc: Verify TSC_ADJUST from idle |
| Date | 2016-11-29 15:30 +0100 |
| Message-ID | <sIRzY-1bf-35@gated-at.bofh.it> (permalink) |
| References | (1 earlier) <sFelr-5AY-7@gated-at.bofh.it> <sFAci-2Z1-9@gated-at.bofh.it> <sFRZw-7a5-19@gated-at.bofh.it> <sFUE1-pB-9@gated-at.bofh.it> <sIMTD-6Co-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
* Thomas Gleixner <tglx@linutronix.de> 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 -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.
> > >
> > > Of course we can ratelimit that MSR read with jiffies, but do you have any
> > > better suggestion aside of doing it timer based?
> >
> > Not really :/
>
> Revamped patch below.
The whole series:
Reviewed-by: Ingo Molnar <mingo@kernel.org>
Ingo
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: [patch 4/8] x86/tsc: Verify TSC_ADJUST from idle Thomas Gleixner <tglx@linutronix.de> - 2016-11-29 10:30 +0100 Re: [patch 4/8] x86/tsc: Verify TSC_ADJUST from idle Ingo Molnar <mingo@kernel.org> - 2016-11-29 15:30 +0100
csiph-web