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: <aHWC-J851eaHa_Au@agluck-desk3>
Date: Mon, 14 Jul 2025 15:21:44 -0700
From: "Luck, Tony" <tony.luck@...el.com>
To: Borislav Petkov <bp@...en8.de>
Cc: Breno Leitao <leitao@...ian.org>,
	"Rafael J. Wysocki" <rafael@...nel.org>,
	Len Brown <lenb@...nel.org>, James Morse <james.morse@....com>,
	"Moore, Robert" <robert.moore@...el.com>,
	"linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"acpica-devel@...ts.linux.dev" <acpica-devel@...ts.linux.dev>,
	"kernel-team@...a.com" <kernel-team@...a.com>
Subject: Re: [PATCH] ghes: Track number of recovered hardware errors

On Mon, Jul 14, 2025 at 07:35:56PM +0200, Borislav Petkov wrote:
> On Mon, Jul 14, 2025 at 05:33:45PM +0000, Luck, Tony wrote:
> > > If you're going to do this, then you can perhaps make this variable always
> > > present so that you don't need an export and call it "hardware_errors_count"
> > > or so and all machinery which deals with RAS - GHES, MCE, AER, bla, can
> > > increment it...
> > 
> > Not sure I'd want to see all the different classes of errors bundled together
> > in a single count.  I think MCE recovery is quite robust and rarely leads to
> > subsequent kernel problems.
> 
> That's what I said. And a RAS tool can give that info already.

There's some value in it being in the kdump file, rather than having
to correlate data from multiple places. That's both time consuming
and error prone.

> But for some reason Breno still wants that info somewhere else.

So what about something like:

enum recovered_error_sources {
	ERR_GHES,
	ERR_MCE,
	ERR_AER,
	...
	ERR_NUM_SOURCES
};

static struct recovered_error_info {
	int	num_recovered_errors;
	time64_t	last_recovered_error_timestamp;
} recovered_error_info[ERR_NUM_SOURCES];

void log_recovered_error(enum recovered_error_sources src)
{
	recovered_error_info[src].num_recovered_errors++;
	recovered_error_info[src].last_recovered_error_timestamp =
		ktime_get_real_seconds();
}
EXPORT_SYMBOL_GPL(log_recovered_error);


PLus code to include that in VMCORE.

Then each subsystem just adds:


	log_recovered_error(ERR_GHES);
or
	log_recovered_error(ERR_MCE);
etc.

in the recovery path.

A count is just a hint. A count with a timestamp that is shortly
before a crash is a smoking gun.

-Tony

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ