From: Lukas Wunner <lukas@wunner.de>
To: sashiko-reviews@lists.linux.dev, Tony Luck <tony.luck@intel.com>,
Steven Rostedt <rostedt@goodmis.org>
Cc: linux-pci@vger.kernel.org
Subject: Re: [PATCH 6/7] PCI/AER: Renumber severity constants
Date: Sun, 27 Sep 2026 21:23:36 +0200 [thread overview]
Message-ID: <arltOHrdHdokyfC9@wunner.de> (raw)
In-Reply-To: <20260927182946.224981F000FF@smtp.kernel.org>
[cc += Tony Luck, Steven Rostedt, start of thread is here:
https://lore.kernel.org/r/244713dea3786099e9ad4eb10ff9f2f430cd7ad3.1790531238.git.lukas@wunner.de
]
On Sun, Sep 27, 2026 at 06:29:45PM +0000, sashiko-bot@kernel.org wrote:
> 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.
>
> > +++ 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
>
> [ ... ]
>
> > +++ 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.
Hm, my understanding was that the TP_PROTO() arguments to a TRACE_EVENT()
do not constitute ABI, but rather (only) the string emitted by
TP_printk().
My patch changes the value of a TP_PROTO() argument but not the
TP_printk() output.
However, looking at rasdaemon source code, it's defining constants with
values identical to the kernel:
https://github.com/mchehab/rasdaemon/blob/master/core/ras-events.h#L248
So it looks like this is uAPI without being marked as such and we're stuck
with it. And so apparently patch [6/7] is not applicable and patch [7/7]
needs a fixup. :(
Thanks,
Lukas
next prev parent reply other threads:[~2026-09-27 19:23 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
2026-09-27 19:23 ` Lukas Wunner [this message]
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=arltOHrdHdokyfC9@wunner.de \
--to=lukas@wunner.de \
--cc=linux-pci@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=sashiko-reviews@lists.linux.dev \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.