Patch "EDAC/skx_common: Filter out the invalid address" has been added to the 6.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    EDAC/skx_common: Filter out the invalid address

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     edac-skx_common-filter-out-the-invalid-address.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 4bdcc2beebe73b85b41af96d152cd4d96fb92b3c
Author: Qiuxu Zhuo <qiuxu.zhuo@xxxxxxxxx>
Date:   Thu Dec 7 09:45:12 2023 +0800

    EDAC/skx_common: Filter out the invalid address
    
    [ Upstream commit 1e92af09fab1b5589f3a7ae68109e3c6a5ca6c6e ]
    
    Decoding an invalid address with certain firmware decoders could
    cause a #PF (Page Fault) in the EFI runtime context, which could
    subsequently hang the system. To make {i10nm,skx}_edac more robust
    against such bogus firmware decoders, filter out invalid addresses
    before allowing the firmware decoder to process them.
    
    Suggested-by: Tony Luck <tony.luck@xxxxxxxxx>
    Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@xxxxxxxxx>
    Signed-off-by: Tony Luck <tony.luck@xxxxxxxxx>
    Link: https://lore.kernel.org/r/20231207014512.78564-1-qiuxu.zhuo@xxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/edac/skx_common.c b/drivers/edac/skx_common.c
index 03d7a74ca22dc..f4b192420be47 100644
--- a/drivers/edac/skx_common.c
+++ b/drivers/edac/skx_common.c
@@ -659,6 +659,10 @@ int skx_mce_check_error(struct notifier_block *nb, unsigned long val,
 	memset(&res, 0, sizeof(res));
 	res.mce  = mce;
 	res.addr = mce->addr & MCI_ADDR_PHYSADDR;
+	if (!pfn_to_online_page(res.addr >> PAGE_SHIFT)) {
+		pr_err("Invalid address 0x%llx in IA32_MC%d_ADDR\n", mce->addr, mce->bank);
+		return NOTIFY_DONE;
+	}
 
 	/* Try driver decoder first */
 	if (!(driver_decode && driver_decode(&res))) {




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux