x86/nmi: Protect NMI entry against instrumentation
authorThomas Gleixner <tglx@linutronix.de>
Mon, 6 Apr 2020 13:55:06 +0000 (15:55 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 11 Jun 2020 13:14:58 +0000 (15:14 +0200)
commitf051f697955049c7cf10a635ab8149aa619243b2
treef4d5678ab79116e38137bd3401d2847b20d2a321
parent6271fef00b3489690e52ce95edbc378357513547
x86/nmi: Protect NMI entry against instrumentation

Mark all functions in the fragile code parts noinstr or force inlining so
they can't be instrumented.

Also make the hardware latency tracer invocation explicit outside of
non-instrumentable section.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Alexandre Chartre <alexandre.chartre@oracle.com>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: Andy Lutomirski <luto@kernel.org>
Link: https://lkml.kernel.org/r/20200505135314.716186134@linutronix.de
arch/x86/include/asm/desc.h
arch/x86/kernel/cpu/common.c
arch/x86/kernel/nmi.c