linux/drivers/acpi
Vishal Verma e8a308e5f4 acpi/nfit, x86/mce: Validate a MCE's address before using it
The NFIT machine check handler uses the physical address from the mce
structure, and compares it against information in the ACPI NFIT table
to determine whether that location lies on an NVDIMM. The mce->addr
field however may not always be valid, and this is indicated by the
MCI_STATUS_ADDRV bit in the status field.

Export mce_usable_address() which already performs validation for the
address, and use it in the NFIT handler.

Fixes: 6839a6d96f ("nfit: do an ARS scrub on hitting a latent media error")
Reported-by: Robert Elliott <elliott@hpe.com>
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
CC: Arnd Bergmann <arnd@arndb.de>
Cc: Dan Williams <dan.j.williams@intel.com>
CC: Dave Jiang <dave.jiang@intel.com>
CC: elliott@hpe.com
CC: "H. Peter Anvin" <hpa@zytor.com>
CC: Ingo Molnar <mingo@redhat.com>
CC: Len Brown <lenb@kernel.org>
CC: linux-acpi@vger.kernel.org
CC: linux-edac <linux-edac@vger.kernel.org>
CC: linux-nvdimm@lists.01.org
CC: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
CC: "Rafael J. Wysocki" <rjw@rjwysocki.net>
CC: Ross Zwisler <zwisler@kernel.org>
CC: stable <stable@vger.kernel.org>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Tony Luck <tony.luck@intel.com>
CC: x86-ml <x86@kernel.org>
CC: Yazen Ghannam <yazen.ghannam@amd.com>
Link: http://lkml.kernel.org/r/20181026003729.8420-2-vishal.l.verma@intel.com
2018-11-06 19:13:26 +01:00
..
acpica ACPICA: Remove acpi_gbl_group_module_level_code and only use acpi_gbl_execute_tables_as_methods instead 2018-10-18 09:17:04 +02:00
apei treewide: kvmalloc() -> kvmalloc_array() 2018-06-12 16:19:22 -07:00
arm64 dma-mapping: remove dma_deconfigure 2018-09-08 11:19:28 +02:00
dptf
nfit acpi/nfit, x86/mce: Validate a MCE's address before using it 2018-11-06 19:13:26 +01:00
pmic ACPI / PMIC: xpower: Block P-Unit I2C access during read-modify-write 2018-10-25 17:00:05 +02:00
x86 pci-v4.20-changes 2018-10-25 06:50:48 -07:00
ac.c ACPI updates for 4.18-rc1 2018-06-05 10:08:27 -07:00
acpi_adxl.c ACPI/ADXL: Add address translation interface using an ACPI DSM 2018-10-16 10:03:00 +02:00
acpi_amba.c
acpi_apd.c ACPI: APD: Add AMD misc clock handler support 2018-05-17 12:44:06 +02:00
acpi_cmos_rtc.c
acpi_configfs.c
acpi_dbg.c
acpi_extlog.c
acpi_ipmi.c acpi:ipmi: Convert ipmi_user_t to struct ipmi_user * 2018-09-18 16:15:33 -05:00
acpi_lpat.c
acpi_lpit.c ACPI / PM: LPIT: Register sysfs attributes based on FADT 2018-10-04 09:01:06 +02:00
acpi_lpss.c Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2018-10-23 13:32:18 +01:00
acpi_memhotplug.c mm/memory_hotplug: make add_memory() take the device_hotplug_lock 2018-10-31 08:54:17 -07:00
acpi_pad.c ACPI: Add Hygon Dhyana support 2018-09-27 18:29:00 +02:00
acpi_platform.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
acpi_pnp.c
acpi_processor.c ACPI / processor: Fix the return value of acpi_processor_ids_walk() 2018-10-04 08:58:32 +02:00
acpi_tad.c ACPI: TAD: Add low-level support for real time capability 2018-10-18 09:11:53 +02:00
acpi_video.c treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
acpi_watchdog.c ACPI / watchdog: Prefer iTCO_wdt always when WDAT table uses RTC SRAM 2018-05-24 10:52:49 +02:00
battery.c ACPI / battery: Do not export energy_full[_design] on devices without full_charge_capacity 2018-08-09 10:49:35 +02:00
bgrt.c
blacklist.c
bus.c ACPI: probe ECDT before loading AML tables regardless of module-level code flag 2018-10-18 09:19:17 +02:00
button.c ACPI / button: fix defined but not used warning 2018-07-09 11:32:44 +02:00
cm_sbs.c
container.c
cppc_acpi.c ACPI / CPPC: Add support for guaranteed performance 2018-10-16 10:33:38 +02:00
custom_method.c ACPI: custom_method: remove meaningless null check before debugfs_remove() 2018-09-10 12:46:51 +02:00
debugfs.c
device_pm.c ACPI / PM: Export acpi_device_get_power() for use by modular build drivers 2018-10-12 12:29:48 +02:00
device_sysfs.c
dock.c
ec.c ACPI / EC: Add another entry for Thinkpad X1 Carbon 6th 2018-08-09 11:01:59 +02:00
ec_sys.c
event.c
evged.c
fan.c treewide: devm_kzalloc() -> devm_kcalloc() 2018-06-12 16:19:22 -07:00
glue.c ACPI / glue: Split dev_is_platform() out of module for wide use 2018-09-10 12:48:50 +02:00
hed.c
internal.h ACPI: EC: Dispatch the EC GPE directly on s2idle wake 2018-05-25 10:32:13 +02:00
ioapic.c
irq.c
Kconfig ACPI / PMIC: xpower: Add depends on IOSF_MBI to Kconfig entry 2018-10-25 17:00:05 +02:00
Makefile ACPI/ADXL: Add address translation interface using an ACPI DSM 2018-10-16 10:03:00 +02:00
numa.c mm: remove include/linux/bootmem.h 2018-10-31 08:54:16 -07:00
nvs.c
osi.c ACPI / OSI: Add OEM _OSI string to enable NVidia HDMI audio 2018-07-20 10:12:41 +02:00
osl.c Merge branches 'acpi-property' and 'acpi-sbs' 2018-10-18 12:37:51 +02:00
pci_irq.c
pci_link.c ACPI / PCI: pci_link: Allow the absence of _PRS and change log level 2018-02-27 17:15:39 +01:00
pci_mcfg.c
pci_root.c PCI/ACPI: Allow _OSC presence to be optional for PCI 2018-09-17 16:32:24 -05:00
pci_slot.c
power.c
pptt.c ACPI/PPTT: Handle architecturally unknown cache types 2018-10-04 23:02:17 +02:00
proc.c
processor_core.c xen/ACPI: don't upload Px/Cx data for disabled processors 2018-08-20 14:46:18 -04:00
processor_driver.c
processor_idle.c ACPI: Add Hygon Dhyana support 2018-09-27 18:29:00 +02:00
processor_pdc.c
processor_perflib.c treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
processor_thermal.c
processor_throttling.c treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
property.c PCI / ACPI: Whitelist D3 for more PCIe hotplug ports 2018-10-02 16:04:40 -05:00
reboot.c ACPI: add missing newline to printk 2018-05-02 13:01:08 +02:00
resource.c
sbs.c ACPI / SBS: Fix GPE storm on recent MacBookPro's 2018-10-08 08:41:35 +02:00
sbshc.c ACPI / SBS: Fix rare oops when removing modules 2018-10-08 08:41:35 +02:00
sbshc.h
scan.c ACPI updates for 4.20-rc1 2018-10-23 10:33:16 +01:00
sleep.c ACPI / PM: save NVS memory for ASUS 1025C laptop 2018-07-11 11:42:13 +02:00
sleep.h
spcr.c
sysfs.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
tables.c mm: remove include/linux/bootmem.h 2018-10-31 08:54:16 -07:00
thermal.c
utils.c
video_detect.c ACPI / video: Add quirk to force acpi-video backlight on Samsung 670Z5E 2018-03-20 10:38:17 +01:00
wakeup.c