mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Shuai Xue <xueshuai@linux.alibaba.com>
To: Breno Leitao <leitao@debian.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Tony Luck <tony.luck@intel.com>, Borislav Petkov <bp@alien8.de>,
	Hanjun Guo <guohanjun@huawei.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Len Brown <lenb@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-team@meta.com, stable@vger.kernel.org
Subject: Re: [PATCH] ACPI: APEI: GHES: Fix severity check in ghes_log_hwerr()
Date: Wed, 4 Nov 2026 09:16:44 +0800	[thread overview]
Message-ID: <9a375554-57ee-4cf4-8d84-60511c96d8ea@linux.alibaba.com> (raw)
In-Reply-To: <20261030-ghes-hwerr-sev-v1-1-145ceb996c77@debian.org>



On 10/30/26 8:18 PM, Breno Leitao wrote:
> ghes_log_hwerr() is meant to count recoverable GHES errors in
> hwerror_data[], but it skips them and counts informational records
> instead. As a result, recoverable CPU, memory, CXL and vendor-specific
> errors reported through GHES never show up in a vmcore.
> 
> ghes_do_proc() passes ghes_log_hwerr() the record severity after
> ghes_severity() has converted it to a GHES_SEV_* value.
> ghes_log_hwerr() compares it against CPER_SEV_RECOVERABLE, which is 0
> in the CPER enum and matches GHES_SEV_NO, so only informational records
> pass and GHES_SEV_RECOVERABLE ones return early.
> 
> Compare against GHES_SEV_RECOVERABLE instead.
> 
> Recoverable PCIe errors that ghes_handle_aer() hands to AER are also
> counted by pci_dev_aer_stats_incr(), so with the check fixed they are
> counted twice under HWERR_RECOV_PCI. That is not addressed here.
> 
> Fixes: 3fa805c37dd4 ("vmcoreinfo: track and log recoverable hardware errors")
> Cc: stable@vger.kernel.org
> Signed-off-by: Breno Leitao <leitao@debian.org>
> ---
>   drivers/acpi/apei/ghes.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
> index 663dc2e601cf72..5d888c82efeaa3 100644
> --- a/drivers/acpi/apei/ghes.c
> +++ b/drivers/acpi/apei/ghes.c
> @@ -899,7 +899,7 @@ EXPORT_SYMBOL_NS_GPL(cxl_cper_kfifo_get, "CXL");
>   
>   static void ghes_log_hwerr(int sev, guid_t *sec_type)
>   {
> -	if (sev != CPER_SEV_RECOVERABLE)
> +	if (sev != GHES_SEV_RECOVERABLE)
>   		return;
>   
>   	if (guid_equal(sec_type, &CPER_SEC_PROC_ARM) ||
> 
> ---
> base-commit: a39c950806213f6861d00f90729acaaa21f2d95a
> base-tree: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> change-id: 20261030-ghes-hwerr-sev-e440624108b6
> 
> Best regards,
> --
> Breno Leitao <leitao@debian.org>


LGTM.

Reviewed-by: Shuai Xue <xueshuai@linux.alibaba.com>

Thanks.
Shuai


      reply	other threads:[~2026-11-04  1:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-30 12:18 Breno Leitao
2026-11-04  1:16 ` Shuai Xue [this message]

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=9a375554-57ee-4cf4-8d84-60511c96d8ea@linux.alibaba.com \
    --to=xueshuai@linux.alibaba.com \
    --cc=akpm@linux-foundation.org \
    --cc=bp@alien8.de \
    --cc=guohanjun@huawei.com \
    --cc=kernel-team@meta.com \
    --cc=leitao@debian.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=rafael@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tony.luck@intel.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

all inboxes | Powered by JetHome®