x86/msr: Carry on after a non-"safe" MSR access fails
authorAndy Lutomirski <luto@kernel.org>
Sat, 2 Apr 2016 14:01:37 +0000 (07:01 -0700)
committerIngo Molnar <mingo@kernel.org>
Wed, 13 Apr 2016 09:37:45 +0000 (11:37 +0200)
commitfbd704374d111bed16a19261176fa30e2379c87c
tree8b1de7476a88eae86f76dc929c37e5a129c94e6c
parentc2ee03b2a94d7ba692cf6206bbe069d5bfcc20ed
x86/msr: Carry on after a non-"safe" MSR access fails

This demotes an OOPS and likely panic due to a failed non-"safe" MSR
access to a WARN_ONCE() and, for RDMSR, a return value of zero.

To be clear, this type of failure should *not* happen.  This patch
exists to minimize the chance of nasty undebuggable failures
happening when a CONFIG_PARAVIRT=y bug in the non-"safe" MSR helpers
gets fixed.

Tested-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Andy Lutomirski <luto@kernel.org>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: KVM list <kvm@vger.kernel.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: xen-devel <Xen-devel@lists.xen.org>
Link: http://lkml.kernel.org/r/26567b216aae70e795938f4b567eace5a0eb90ba.1459605520.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/include/asm/msr.h
arch/x86/mm/extable.c