linux/arch
Borislav Petkov ce31b27e12 x86/mce: Fix MCE severity messages
commit 17fea54bf0 upstream.

Derek noticed that a critical MCE gets reported with the wrong
error type description:

  [Hardware Error]: CPU 34: Machine Check Exception: 5 Bank 9: f200003f000100b0
  [Hardware Error]: RIP !INEXACT! 10:<ffffffff812e14c1> {intel_idle+0xb1/0x170}
  [Hardware Error]: TSC 49587b8e321cb
  [Hardware Error]: PROCESSOR 0:306e4 TIME 1431561296 SOCKET 1 APIC 29
  [Hardware Error]: Some CPUs didn't answer in synchronization
  [Hardware Error]: Machine check: Invalid
				   ^^^^^^^

The last line with 'Invalid' should have printed the high level
MCE error type description we get from mce_severity, i.e.
something like:

  [Hardware Error]: Machine check: Action required: data load error in a user process

this happens due to the fact that mce_no_way_out() iterates over
all MCA banks and possibly overwrites the @msg argument which is
used in the panic printing later.

Change behavior to take the message of only and the (last)
critical MCE it detects.

Reported-by: Derek <denc716@gmail.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Link: http://lkml.kernel.org/r/1431936437-25286-3-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
[ kamal: backport to 3.13-stable: context ]
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
History 2015-07-09 14:35:56 +01:00
..
alpha vm: add VM_FAULT_SIGSEGV handling support 2015-02-04 10:58:27 +00:00
arc ARC: signal handling robustify 2015-05-12 09:36:34 +01:00
arm ARM: clk-imx6q: refine sata's parent 2015-07-01 10:20:38 +01:00
arm64 arm64: add missing PAGE_ALIGN() to __dma_free() 2015-05-28 10:53:16 +01:00
avr32 vm: add VM_FAULT_SIGSEGV handling support 2015-02-04 10:58:27 +00:00
blackfin blackfin: vmlinux.lds.S: reserve 32 bytes space at the end of data section for XIP kernel 2014-07-26 08:32:50 +08:00
c6x C6x: time: Ensure consistency in __init 2015-05-06 11:33:02 +01:00
cris vm: add VM_FAULT_SIGSEGV handling support 2015-02-04 10:58:27 +00:00
frv vm: add VM_FAULT_SIGSEGV handling support 2015-02-04 10:58:27 +00:00
hexagon Hexagon: Delete stale barrier.h 2014-05-01 10:09:47 -07:00
ia64 efi/reboot: Add generic wrapper around EfiResetSystem() 2015-05-12 09:36:34 +01:00
m32r vm: add VM_FAULT_SIGSEGV handling support 2015-02-04 10:58:27 +00:00
m68k vm: add VM_FAULT_SIGSEGV handling support 2015-02-04 10:58:27 +00:00
metag metag: Fix KSTK_EIP() and KSTK_ESP() macros 2015-03-18 09:58:55 +00:00
microblaze vm: add VM_FAULT_SIGSEGV handling support 2015-02-04 10:58:27 +00:00
mips MIPS: KVM: Do not sign extend on unsigned MMIO load 2015-06-12 13:05:38 +01:00
mn10300 vm: add VM_FAULT_SIGSEGV handling support 2015-02-04 10:58:27 +00:00
openrisc vm: add VM_FAULT_SIGSEGV handling support 2015-02-04 10:58:27 +00:00
parisc parisc,metag: Fix crashes due to stack randomization on stack-grows-upwards architectures 2015-05-28 10:00:03 +01:00
powerpc powerpc: Align TOC to 256 bytes 2015-06-02 12:08:15 +01:00
s390 crypto: s390/ghash - Fix incorrect ghash icv buffer handling. 2015-06-02 12:08:17 +01:00
score vm: add VM_FAULT_SIGSEGV handling support 2015-02-04 10:58:27 +00:00
sh nosave: consolidate __nosave_{begin,end} in <asm/sections.h> 2015-05-06 10:24:18 +01:00
sparc nosave: consolidate __nosave_{begin,end} in <asm/sections.h> 2015-05-06 10:24:18 +01:00
tile vm: add VM_FAULT_SIGSEGV handling support 2015-02-04 10:58:27 +00:00
um vm: add VM_FAULT_SIGSEGV handling support 2015-02-04 10:58:27 +00:00
unicore32 nosave: consolidate __nosave_{begin,end} in <asm/sections.h> 2015-05-06 10:24:18 +01:00
x86 x86/mce: Fix MCE severity messages 2015-07-09 14:35:56 +01:00
xtensa xtensa: ISS: fix locking in TAP network adapter 2015-05-06 10:24:17 +01:00
.gitignore arch: Ignore arch/i386 and arch/x86_64 2008-01-19 21:29:39 -08:00
Kconfig uprobes: Kconfig dependency fix 2014-03-18 16:39:33 -04:00