lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aHU6Ds1vrbB-Zbcp@agluck-desk3>
Date: Mon, 14 Jul 2025 10:10:38 -0700
From: "Luck, Tony" <tony.luck@...el.com>
To: Breno Leitao <leitao@...ian.org>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>, Len Brown <lenb@...nel.org>,
	James Morse <james.morse@....com>, Borislav Petkov <bp@...en8.de>,
	Robert Moore <robert.moore@...el.com>, linux-acpi@...r.kernel.org,
	linux-kernel@...r.kernel.org, acpica-devel@...ts.linux.dev,
	kernel-team@...a.com
Subject: Re: [PATCH] ghes: Track number of recovered hardware errors

On Mon, Jul 14, 2025 at 09:57:29AM -0700, Breno Leitao wrote:
> Add a global variable, ghes_recovered_erors, to count hardware errors
> classified as recoverable or corrected. This counter is exported and
> included in vmcoreinfo for post-crash diagnostics.
> 
> Tracking this value helps operators potentially correlate hardware
> errors across system events and crash dumps, indicating that RAS logs
> might be useful while analyzing these crashes. This discussion and
> motivation could be found in [1].
> 
> Atomic operations are deliberately omitted, as precise accuracy is not
> required for this metric.

[snip]

> @@ -1100,13 +1106,16 @@ static int ghes_proc(struct ghes *ghes)
>  {
>  	struct acpi_hest_generic_status *estatus = ghes->estatus;
>  	u64 buf_paddr;
> -	int rc;
> +	int rc, sev;
>  
>  	rc = ghes_read_estatus(ghes, estatus, &buf_paddr, FIX_APEI_GHES_IRQ);
>  	if (rc)
>  		goto out;
>  
> -	if (ghes_severity(estatus->error_severity) >= GHES_SEV_PANIC)
> +	sev = ghes_severity(estatus->error_severity);
> +	if (sev == GHES_SEV_RECOVERABLE || sev ==  GHES_SEV_CORRECTED)
> +		ghes_recovered_erors += 1;

		ghes_recovered_erors++:

> +	else if (sev >= GHES_SEV_PANIC)
>  		__ghes_panic(ghes, estatus, buf_paddr, FIX_APEI_GHES_IRQ);
>  
>  	if (!ghes_estatus_cached(estatus)) {
> @@ -1750,6 +1759,8 @@ void __init acpi_ghes_init(void)
>  		pr_info(GHES_PFX "APEI firmware first mode is enabled by APEI bit.\n");
>  	else
>  		pr_info(GHES_PFX "Failed to enable APEI firmware first mode.\n");
> +
> +	ghes_recovered_erors = 0;

Unnecessary. Global variables all start at zero unless otherwise
initialized.

>  }

-Tony

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ