From: sashiko-bot@kernel.org
To: "Shaikh Kamaluddin" <shaikhkamal2012@gmail.com>
Cc: linux-cxl@vger.kernel.org
Subject: Re: [PATCH v2] cxl/mce: Avoid alias page retirement for corrected errors
Date: Wed, 12 Aug 2026 15:28:35 +0000 [thread overview]
Message-ID: <20260812152835.DB33D1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260812151759.14390-1-shaikhkamal2012@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Bypassing CXL MCE handling for poison consumption errors on AMD architectures.
--
--- Patch [1]: [PATCH v2] cxl/mce: Avoid alias page retirement for corrected errors ---
commit efcb1cbc0f2e51e970d17decc010e02b84097870
Author: Shaikh Kamaluddin <shaikhkamal2012@gmail.com>
cxl/mce: Avoid alias page retirement for corrected errors
This commit restricts Extended Linear Cache (ELC) MCE handling to uncorrected
memory errors. It aims to prevent needlessly reducing usable memory on
corrected or non-memory errors.
> diff --git a/drivers/cxl/core/mce.c b/drivers/cxl/core/mce.c
> index 65fed913b2217..e3c561489a003 100644
> --- a/drivers/cxl/core/mce.c
> +++ b/drivers/cxl/core/mce.c
> @@ -18,7 +18,13 @@ static int cxl_handle_mce(struct notifier_block *nb, unsigned long val,
> u64 spa, spa_alias;
> unsigned long pfn;
>
> - if (!mce || !mce_usable_address(mce))
> + if (!mce)
> + return NOTIFY_DONE;
> +
> + if (!mce_is_memory_error(mce) || mce_is_correctable(mce))
> + return NOTIFY_DONE;
[Severity: High]
Does this new check bypass CXL MCE handling for poison consumption errors
on AMD architectures?
On AMD, mce_is_memory_error() maps to amd_mce_is_memory_error(), which
evaluates to true strictly for SMCA Unified Memory Controller (UMC) banks or
legacy northbridge banks.
When a CXL poison consumption error occurs, it is logged in the consuming core
unit (e.g., Load/Store or Data Fabric) with the MCI_STATUS_POISON bit set,
which is not a UMC bank. This means mce_is_memory_error() will evaluate to
false, causing this handler to return NOTIFY_DONE and silently skip offlining
the aliased page.
Previously, relying on mce_usable_address() correctly identified these errors
since amd_mce_usable_address() checks for the MCI_STATUS_POISON bit on all
non-northbridge banks. Could this lead to data corruption or repeated machine
checks when the corrupted memory is re-accessed?
> +
> + if (!mce_usable_address(mce))
> return NOTIFY_DONE;
>
> spa = mce->addr & MCI_ADDR_PHYSADDR;
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260812151759.14390-1-shaikhkamal2012@gmail.com?part=1
next prev parent reply other threads:[~2026-08-12 15:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-12 15:17 [PATCH v2] cxl/mce: Avoid alias page retirement for corrected errors Shaikh Kamaluddin
2026-08-12 15:28 ` sashiko-bot [this message]
2026-08-12 23:02 ` Alison Schofield
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260812152835.DB33D1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-cxl@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=shaikhkamal2012@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox