linux-stable/drivers/edac
Anna Karbownik bd3ead4576 EDAC, sb_edac: Fix out of bound writes during DIMM configuration on KNL
commit bf8486709a upstream.

Commit

  3286d3eb90 ("EDAC, sb_edac: Drop NUM_CHANNELS from 8 back to 4")

decreased NUM_CHANNELS from 8 to 4, but this is not enough for Knights
Landing which supports up to 6 channels.

This caused out-of-bounds writes to pvt->mirror_mode and pvt->tolm
variables which don't pay critical role on KNL code path, so the memory
corruption wasn't causing any visible driver failures.

The easiest way of fixing it is to change NUM_CHANNELS to 6. Do that.

An alternative solution would be to restructure the KNL part of the
driver to 2MC/3channel representation.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Anna Karbownik <anna.karbownik@intel.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: jim.m.snow@intel.com
Cc: krzysztof.paliswiat@intel.com
Cc: lukasz.odzioba@intel.com
Cc: qiuxu.zhuo@intel.com
Cc: linux-edac <linux-edac@vger.kernel.org>
Cc: <stable@vger.kernel.org>
Fixes: 3286d3eb90 ("EDAC, sb_edac: Drop NUM_CHANNELS from 8 back to 4")
Link: http://lkml.kernel.org/r/1519312693-4789-1-git-send-email-anna.karbownik@intel.com
[ Massage commit message. ]
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-08 22:41:20 -08:00
..
altera_edac.c EDAC, altera: Fix error handling path in altr_edac_device_probe() 2017-08-18 18:21:27 +02:00
altera_edac.h EDAC, altera: Rename device trigger to common name 2016-09-01 08:55:24 +02:00
amd64_edac.c x86/cpu: Rename cpu_data.x86_mask to cpu_data.x86_stepping 2018-02-22 15:42:24 +01:00
amd64_edac.h EDAC, amd64: Bump driver version 2017-02-14 11:58:05 +01:00
amd64_edac_dbg.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
amd64_edac_inj.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
amd76x_edac.c EDAC: Get rid of mci->mod_ver 2017-07-17 13:42:48 +02:00
amd8111_edac.c edac: rename edac_core.h to edac_mc.h 2016-12-15 08:54:51 -02:00
amd8111_edac.h
amd8131_edac.c edac: rename edac_core.h to edac_mc.h 2016-12-15 08:54:51 -02:00
amd8131_edac.h tree-wide: fix comment/printk typos 2010-11-01 15:38:34 -04:00
cell_edac.c edac: rename edac_core.h to edac_mc.h 2016-12-15 08:54:51 -02:00
cpc925_edac.c EDAC, cpc925, ppc4xx: Convert to using %pOF instead of full_name 2017-07-19 07:42:41 +02:00
debugfs.c EDAC: Use edac_debugfs_remove_recursive() in edac_debugfs_exit() 2016-02-10 10:37:46 +01:00
e7xxx_edac.c EDAC: Get rid of mci->mod_ver 2017-07-17 13:42:48 +02:00
e752x_edac.c EDAC: Get rid of mci->mod_ver 2017-07-17 13:42:48 +02:00
edac_device.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
edac_device.h edac: move documentation from edac_device to edac_core.h 2016-12-15 08:54:51 -02:00
edac_device_sysfs.c edac: move EDAC device definitions to drivers/edac/edac_device.h 2016-12-15 08:54:51 -02:00
edac_mc.c EDAC: Rename report status accessors 2017-04-10 17:15:02 +02:00
edac_mc.h EDAC: Add routine to check if MC devices list is empty 2017-01-28 14:36:47 +01:00
edac_mc_sysfs.c EDAC: Make device_type const 2017-08-20 13:12:32 +02:00
edac_module.c edac: rename edac_core.h to edac_mc.h 2016-12-15 08:54:51 -02:00
edac_module.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
edac_pci.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
edac_pci.h edac: move documentation from edac_pci*.c to edac_pci.h 2016-12-15 08:54:51 -02:00
edac_pci_sysfs.c edac: move documentation from edac_pci*.c to edac_pci.h 2016-12-15 08:54:51 -02:00
fsl_ddr_edac.c EDAC, fsl_ddr: Make locally used symbols static 2017-02-09 17:40:54 +01:00
fsl_ddr_edac.h EDAC, fsl_ddr: Add missing DDR DRAM types 2016-09-01 10:28:01 +02:00
ghes_edac.c EDAC: Get rid of mci->mod_ver 2017-07-17 13:42:48 +02:00
highbank_l2_edac.c edac: rename edac_core.h to edac_mc.h 2016-12-15 08:54:51 -02:00
highbank_mc_edac.c EDAC: Get rid of mci->mod_ver 2017-07-17 13:42:48 +02:00
i7core_edac.c EDAC: Make device_type const 2017-08-20 13:12:32 +02:00
i3000_edac.c EDAC: Get rid of mci->mod_ver 2017-07-17 13:42:48 +02:00
i3200_edac.c EDAC: Get rid of mci->mod_ver 2017-07-17 13:42:48 +02:00
i5000_edac.c EDAC: Get rid of mci->mod_ver 2017-07-17 13:42:48 +02:00
i5100_edac.c EDAC: Get rid of mci->mod_ver 2017-07-17 13:42:48 +02:00
i5400_edac.c EDAC: Get rid of mci->mod_ver 2017-07-17 13:42:48 +02:00
i7300_edac.c EDAC: Get rid of mci->mod_ver 2017-07-17 13:42:48 +02:00
i82443bxgx_edac.c EDAC: Get rid of mci->mod_ver 2017-07-17 13:42:48 +02:00
i82860_edac.c EDAC: Get rid of mci->mod_ver 2017-07-17 13:42:48 +02:00
i82875p_edac.c EDAC: Get rid of mci->mod_ver 2017-07-17 13:42:48 +02:00
i82975x_edac.c EDAC: Get rid of mci->mod_ver 2017-07-17 13:42:48 +02:00
ie31200_edac.c EDAC: Get rid of mci->mod_ver 2017-07-17 13:42:48 +02:00
Kconfig EDAC, ghes: Do not enable it by default 2017-04-27 14:15:38 +02:00
layerscape_edac.c edac: rename edac_core.h to edac_mc.h 2016-12-15 08:54:51 -02:00
Makefile EDAC: Delete edac_stub.c 2017-04-10 17:14:48 +02:00
mce_amd.c EDAC, mce_amd: Get rid of local var in amd_filter_mce() 2017-08-21 17:59:38 +02:00
mce_amd.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mpc85xx_edac.c EDAC, mpc85xx: Add T2080 l2-cache support 2017-02-03 10:36:35 +01:00
mpc85xx_edac.h EDAC, fsl-ddr: Separate FSL DDR driver from MPC85xx 2016-09-01 10:28:00 +02:00
mv64x60_edac.c EDAC: Get rid of mci->mod_ver 2017-07-17 13:42:48 +02:00
mv64x60_edac.h edac: Drop __DATE__ usage 2011-04-19 00:23:22 +02:00
octeon_edac-l2c.c edac: rename edac_core.h to edac_mc.h 2016-12-15 08:54:51 -02:00
octeon_edac-lmc.c EDAC, octeon: Fix an uninitialized variable warning 2018-02-16 20:23:07 +01:00
octeon_edac-pc.c edac: rename edac_core.h to edac_mc.h 2016-12-15 08:54:51 -02:00
octeon_edac-pci.c edac: rename edac_core.h to edac_mc.h 2016-12-15 08:54:51 -02:00
pasemi_edac.c edac: rename edac_core.h to edac_mc.h 2016-12-15 08:54:51 -02:00
pnd2_edac.c EDAC, pnd2: Properly toggle hidden state for P2SB PCI device 2017-08-19 10:51:11 +02:00
pnd2_edac.h EDAC, pnd2_edac: Add new EDAC driver for Intel SoC platforms 2017-03-16 12:40:52 +01:00
ppc4xx_edac.c EDAC, cpc925, ppc4xx: Convert to using %pOF instead of full_name 2017-07-19 07:42:41 +02:00
ppc4xx_edac.h
r82600_edac.c EDAC: Get rid of mci->mod_ver 2017-07-17 13:42:48 +02:00
sb_edac.c EDAC, sb_edac: Fix out of bound writes during DIMM configuration on KNL 2018-03-08 22:41:20 -08:00
skx_edac.c EDAC: Get rid of mci->mod_ver 2017-07-17 13:42:48 +02:00
synopsys_edac.c EDAC: Get rid of mci->mod_ver 2017-07-17 13:42:48 +02:00
thunderx_edac.c EDAC, thunderx: Fix error handling path in thunderx_lmc_probe() 2017-08-18 19:12:08 +02:00
tile_edac.c edac: rename edac_core.h to edac_mc.h 2016-12-15 08:54:51 -02:00
wq.c EDAC, wq: Remove deprecated create_singlethread_workqueue() 2016-08-15 07:21:29 +02:00
x38_edac.c EDAC: Get rid of mci->mod_ver 2017-07-17 13:42:48 +02:00
xgene_edac.c EDAC: Get rid of mci->mod_ver 2017-07-17 13:42:48 +02:00