OpenCloudOS-Kernel/arch/x86/kernel/cpu/mcheck
Borislav Petkov 78ce241099 x86/MCE/AMD: Cache SMCA MISC block addresses
... into a global, two-dimensional array and service subsequent reads from
that cache to avoid rdmsr_on_cpu() calls during CPU hotplug (IPIs with IRQs
disabled).

In addition, this fixes a KASAN slab-out-of-bounds read due to wrong usage
of the bank->blocks pointer.

Fixes: 27bd595027 ("x86/mce/AMD: Get address from already initialized block")
Reported-by: Johannes Hirte <johannes.hirte@datenkhaos.de>
Tested-by: Johannes Hirte <johannes.hirte@datenkhaos.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Yazen Ghannam <yazen.ghannam@amd.com>
Link: http://lkml.kernel.org/r/20180414004230.GA2033@probook
2018-05-19 15:19:30 +02:00
..
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dev-mcelog.c vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
mce-apei.c x86/ras: Flip the TSC-adding logic 2017-01-24 09:14:54 +01:00
mce-genpool.c x86/mce: Make the MCE notifier a blocking one 2017-04-18 22:23:48 +02:00
mce-inject.c x86/tsc: Get rid of rdtscll() 2018-03-23 20:07:54 +01:00
mce-internal.h x86/mce: Convert 'struct mca_config' bools to a bitfield 2018-02-21 17:00:53 +01:00
mce-severity.c x86/MCE: Extend table to report action optional errors through CMCI too 2017-12-04 20:38:44 +01:00
mce.c Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2018-04-02 15:45:30 -07:00
mce_amd.c x86/MCE/AMD: Cache SMCA MISC block addresses 2018-05-19 15:19:30 +02:00
mce_intel.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
p5.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
therm_throt.c x86/mce: Remove duplicated tracing interrupt code 2017-08-29 11:42:26 +02:00
threshold.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
winchip.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00