linux/arch
Yazen Ghannam 54a5155afa x86/MCE/AMD: Always give panic severity for UC errors in kernel context
commit d65dfc81bb upstream.

The AMD severity grading function was introduced in kernel 4.1. The
current logic can possibly give MCE_AR_SEVERITY for uncorrectable
errors in kernel context. The system may then get stuck in a loop as
memory_failure() will try to handle the bad kernel memory and find it
busy.

Return MCE_PANIC_SEVERITY for all UC errors IN_KERNEL context on AMD
systems.

After:

  b2f9d678e2 ("x86/mce: Check for faults tagged in EXTABLE_CLASS_FAULT exception table entries")

was accepted in v4.6, this issue was masked because of the tail-end attempt
at kernel mode recovery in the #MC handler.

However, uncorrectable errors IN_KERNEL context should always be considered
unrecoverable and cause a panic.

Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
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>
Cc: linux-edac <linux-edac@vger.kernel.org>
Fixes: bf80bbd7dc (x86/mce: Add an AMD severities-grading function)
Link: http://lkml.kernel.org/r/20171106174633.13576-1-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2017-11-21 09:23:30 +01:00
..
alpha alpha: uapi: Add support for __SANE_USERSPACE_TYPES__ 2017-09-07 08:35:40 +02:00
arc ARC: Re-enable MMU upon Machine Check exception 2017-09-27 14:39:23 +02:00
arm ARM: dts: omap5-uevm: Allow bootloader to configure USB Ethernet MAC 2017-11-21 09:23:22 +01:00
arm64 arm64: dts: NS2: reserve memory for Nitro firmware 2017-11-21 09:23:26 +01:00
avr32 Merge branch 'akpm' (patches from Andrew) 2016-10-07 21:38:00 -07:00
blackfin ptrace: Don't allow accessing an undumpable mm 2017-01-06 10:40:13 +01:00
c6x c6x/ptrace: Remove useless PTRACE_SETREGSET implementation 2017-03-31 10:31:46 +02:00
cris cris: Only build flash rescue image if CONFIG_ETRAX_AXISFLASHMAP is selected 2017-01-12 11:39:24 +01:00
frv mm: larger stack guard gap, between vmas 2017-06-24 07:11:18 +02:00
h8300 h8300/ptrace: Fix incorrect register transfer count 2017-03-31 10:31:46 +02:00
hexagon nmi_backtrace: generate one-line reports for idle cpus 2016-10-07 18:46:30 -07:00
ia64 ptrace: Don't allow accessing an undumpable mm 2017-01-06 10:40:13 +01:00
m32r mm: replace access_process_vm() write parameter with gup_flags 2016-10-19 08:31:25 -07:00
m68k m68k: Fix ndelay() macro 2016-10-30 10:13:55 +01:00
metag metag/uaccess: Check access_ok in strncpy_from_user 2017-05-25 15:44:46 +02:00
microblaze Merge branch 'work.uaccess2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2016-10-11 23:38:39 -07:00
mips MIPS: Netlogic: Exclude netlogic,xlp-pic code from XLR builds 2017-11-21 09:23:28 +01:00
mn10300 mn10300: fix build error of missing fpu_save() 2017-06-17 06:41:56 +02:00
nios2 nios2: reserve boot memory for device tree 2017-04-12 12:41:14 +02:00
openrisc openrisc: Add _text symbol to fix ksym build error 2017-08-06 18:59:46 -07:00
parisc parisc: Fix double-word compare and exchange in LWS code on 32-bit kernels 2017-10-27 10:38:06 +02:00
powerpc security/keys: add CONFIG_KEYS_COMPAT to Kconfig 2017-11-18 11:22:24 +01:00
s390 security/keys: add CONFIG_KEYS_COMPAT to Kconfig 2017-11-18 11:22:24 +01:00
score Merge branch 'gup_flag-cleanups' 2016-10-19 08:39:47 -07:00
sh serial: sh-sci: Fix register offsets for the IRDA serial port 2017-11-15 15:53:14 +01:00
sparc security/keys: add CONFIG_KEYS_COMPAT to Kconfig 2017-11-18 11:22:24 +01:00
tile mm: larger stack guard gap, between vmas 2017-06-24 07:11:18 +02:00
um um: Fix to call read_initrd after init_bootmem 2017-05-25 15:44:47 +02:00
unicore32 unicore32: use simpler API for random address requests 2016-10-11 15:06:32 -07:00
x86 x86/MCE/AMD: Always give panic severity for UC errors in kernel context 2017-11-21 09:23:30 +01:00
xtensa xtensa: don't limit csum_partial export by CONFIG_NET 2017-08-16 13:43:16 -07:00
.gitignore arch: Ignore arch/i386 and arch/x86_64 2008-01-19 21:29:39 -08:00
Kconfig This adds a new gcc plugin named "latent_entropy". It is designed to 2016-10-15 10:03:15 -07:00