Linux PCI subsystem development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Lukas Wunner" <lukas@wunner.de>
Cc: linux-pci@vger.kernel.org
Subject: Re: [PATCH 6/7] PCI/AER: Renumber severity constants
Date: Sun, 27 Sep 2026 18:29:45 +0000	[thread overview]
Message-ID: <20260927182946.224981F000FF@smtp.kernel.org> (raw)
In-Reply-To: <244713dea3786099e9ad4eb10ff9f2f430cd7ad3.1790531238.git.lukas@wunner.de>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Critical] ras/aer: ABI breakage in aer_event tracepoint severity values
--

commit 1b45a2c88d40942123bcb76f3b3bbf8eb9ec2cac
Author: Lukas Wunner <lukas@wunner.de>

PCI/AER: Renumber severity constants

This commit modifies the AER severity constants to align with the Device Status
Register bit numbers defined in the PCIe specification. It updates the severity
strings and the ras_event documentation to reflect the new constant values.

> diff --git a/include/linux/aer.h b/include/linux/aer.h
> index df0f5c382286f..795c551320088 100644
> --- a/include/linux/aer.h
> +++ b/include/linux/aer.h
> @@ -11,10 +11,10 @@
>  #include <linux/errno.h>
>  #include <linux/types.h>
>  
> -#define AER_NONFATAL			0
> -#define AER_FATAL			1
> -#define AER_CORRECTABLE			2
> -#define DPC_FATAL			3
> +/* Must match bit number in Device Status Register (PCIe r7.1, sec 7.5.3.5) */
> +#define AER_CORRECTABLE			0
> +#define AER_NONFATAL			1
> +#define AER_FATAL			2

[ ... ]

> diff --git a/include/ras/ras_event.h b/include/ras/ras_event.h
> index fdb785fa4613a..1e03ade99386b 100644
> --- a/include/ras/ras_event.h
> +++ b/include/ras/ras_event.h
> @@ -302,7 +302,7 @@ TRACE_EVENT(non_standard_event,
>   *			([domain:]bus:device.function).
>   * u32 status -		Either the correctable or uncorrectable register
>   *			indicating what error or errors have been seen
> - * u8 severity -	error severity 0:NONFATAL 1:FATAL 2:CORRECTED
> + * u8 severity -	error severity 0:CORRECTED 1:NONFATAL 2:FATAL
>   */

[Severity: Critical]
Does this change unintentionally break the userspace ABI for the aer_event
tracepoint?

The tracepoint exports the severity field as a raw u8 integer in the binary
trace ring buffer. By renumbering the underlying AER constants in
include/linux/aer.h, the tracepoint now emits different integers for hardware
error events without an ABI translation layer.

Userspace tools like rasdaemon that rely on the historical raw integer values
will now misclassify hardware error severities. For example, a correctable
error (now 0) would be incorrectly interpreted as non-fatal by older tools
expecting the previous ABI layout.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1790531238.git.lukas@wunner.de?part=6

  reply	other threads:[~2026-09-27 18:29 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-27 18:02 [PATCH 0/7] Error reporting for AER-incapable devices Lukas Wunner
2026-09-27 18:02 ` [PATCH 1/7] PCI/DPC: Avoid access to non-existent AER capability Lukas Wunner
2026-09-27 18:27   ` sashiko-bot
2026-09-29 18:49   ` Kuppuswamy Sathyanarayanan
2026-09-27 18:02 ` [PATCH 2/7] PCI/DPC: Reinstate support for AER-incapable ports Lukas Wunner
2026-09-27 18:26   ` sashiko-bot
2026-09-29 19:04   ` Kuppuswamy Sathyanarayanan
2026-09-27 18:02 ` [PATCH 3/7] PCI/ERR: Avoid stale error status bits on recovery failure Lukas Wunner
2026-09-27 18:31   ` sashiko-bot
2026-09-27 18:57     ` Lukas Wunner
2026-09-29 19:20   ` Kuppuswamy Sathyanarayanan
2026-09-27 18:02 ` [PATCH 4/7] PCI/AER: Drop AER native check from handles_cxl_errors() Lukas Wunner
2026-09-27 18:26   ` sashiko-bot
2026-09-28 20:58   ` Bowman, Terry
2026-09-29 19:24   ` Kuppuswamy Sathyanarayanan
2026-09-27 18:02 ` [PATCH 5/7] PCI/AER: Move AER capability check out of pcie_aer_is_native() Lukas Wunner
2026-09-27 18:30   ` sashiko-bot
2026-09-29 19:47   ` Kuppuswamy Sathyanarayanan
2026-09-27 18:02 ` [PATCH 6/7] PCI/AER: Renumber severity constants Lukas Wunner
2026-09-27 18:29   ` sashiko-bot [this message]
2026-09-27 19:23     ` Lukas Wunner
2026-09-29 19:55   ` Kuppuswamy Sathyanarayanan
2026-09-27 18:02 ` [PATCH 7/7] PCI/AER: Enable baseline capability error reporting Lukas Wunner
2026-09-27 18:33   ` sashiko-bot
2026-09-29 21:01   ` Kuppuswamy Sathyanarayanan
2026-09-30  7:08     ` Lukas Wunner
2026-10-01 17:44       ` Kuppuswamy Sathyanarayanan

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=20260927182946.224981F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=sashiko-reviews@lists.linux.dev \
    /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