On Tue, Nov 17, 2026 at 12:10:10PM +0100, Pierre Gondois wrote:
> Hello,
> 
> This patchset should be applied on top of [1].
> 
> GHES and acpi_extlog handle many of the same CPER sections, but have
> separate implementations that do not always report errors in the same
> way. This series brings that code together so both paths can use the
> same reporting helpers.
> 
> Most of the patches prepare for that move. MCE reporting for Memory
> Error Section 2 is also added. In the MCE extended-log policy, tracing
> and PCIe/CXL handling no longer depend on whether a RAS daemon is
> registered. Only fatal CPER records are printed to the console, as
> briefly suggested at [2]. For nonfatal records,
> users need tracing enabled or a subsystem handler that reports the error.
> 
> With the common helper, GHES can emit memory trace events even without
> an EDAC driver registered. CXL media records that cannot be queued are
> reported through the nonstandard trace event instead of being dropped.
> 
> [1] 
> https://lore.kernel.org/lkml/[email protected]/
> [2] 
> https://lore.kernel.org/lkml/20240521183913.GGZkzqUSN1hdE-_OEY@fat_crate.local/
> 

[...]

> 
> Pierre Gondois (19):
>   x86/APEI: Extract common CPER memory error reporting helper
>   x86/APEI: Report Memory Error Section 2 through MCE

These should use the "x86/mce/apei" prefix.

>   ras: Bound CPER FRU strings in trace events

ras -> RAS following other commits in this subsystem.

>   ACPI: APEI: Use empty FRU values if valid bit is absent
>   PCI/AER: Embed aer_capability_regs copy in struct aer_recover_entry
>   ACPI: APEI: Remove aer allocation in ghes_handle_aer()
>   ACPI: extlog: Provide HEST generic data to extlog_print_pcie()
>   ACPI: extlog: Align extlog_print_pcie() and ghes_handle_aer()
>   ACPI: extlog: Report errors independently of RAS consumers
>   ACPI: extlog: Simplify fatal record printing
>   RAS: Remove unused ras_userspace_consumers()
>   ACPI: extlog: Extract CPER reporting from acpi_extlog
>   ACPI: APEI: Share helpers with the common CPER reporter
>   ACPI: APEI: Return status from cxl_cper_post_event()
>   ACPI: APEI: Extend common CPER reporting for GHES section types
>   ACPI: extlog: Report error severity using GHES bindings in MCE
>   ACPI: APEI: Share the extlog PCIe handler with GHES
>   ACPI: APEI: Route GHES section reporting through extlog
>   PCI/ERR: Avoid NULL bridge pointer
> 

There have already been a few comments on putting fixes at the beginning
of the series.

Like in the other thread, I asked an LLM assistant about patch
re-ordering (copied below). Of course, these are mostly suggestions
beside the "fixes first" convention.

"v4" is the latest Memory Error Section 2 series.
https://lore.kernel.org/all/[email protected]/

Thanks,
Yazen

=== PROPOSED PATCH ORDER ===
Rules: fixes first with Fixes: and Cc: stable, independent of the
feature (Boris, "Fixes go *first*",
<20261124043051.GNawUS-yBnVpnuUVhH@fat_crate.local>). Then prep with no
behavior change, then the feature. One maintainer tree per patch. New
helpers land once in final form. Policy changes under objection go last
so they can be dropped. Numbers in [] are the v1 patch numbers.

A. Fixes, posted first and separately (by tree)
  A1 [19] PCI/ERR (or PCI/AER): avoid NULL bridge in firmware-first
     recovery. PCI tree, Cc: stable. Reachable on mainline through GHES.
     The Fixes: tag must go back further than 0791721d8007, which only
     renamed dev to bridge. The code before it already dereferenced
     pci_upstream_bridge(dev). Kuppuswamy's !pci_is_pcie() check in
     aer_recover_work_func()
     <[email protected]> keeps the
     native AER/DPC/EDR path untouched.
  A2 [3]  ras: Bound CPER FRU strings in trace events. Out-of-bounds read
     in existing events. Needs Fixes: and Cc: stable. Could also join
     v4's group A.
  A3 [4]  ACPI: APEI: Use empty FRU values if valid bit is absent.
     Existing GHES bug, needs Fixes:.
  A4 [16] ACPI: extlog: pass GHES severity to log_non_standard_event().
     Fixes: a2995f7dab51. ghes_severity() is static inline in ghes.c on
     mainline (base ghes.c:325), so the fix first needs the part of [13]
     that moves it to apei-internal.h. Drop "MCE" from the subject. This
     also removes the severity mismatch [15] currently introduces.

B. x86 MCE Section 2 reporting (tip/x86), own series on top of v4
  B1 [2, part] x86/mce: apei_mce_report_mem_error() prototype rename
     corrected -> severity (Cameron <20261118185721.11639b38@jic23-hlaptop>)
  B2 [1] x86/APEI: Extract common CPER memory error reporting helper
  B3 [2, rest] x86/APEI: Report Memory Error Section 2 through MCE
  This brings back the arch_apei_report_mem_error() path v4 dropped
  after v3 and gives GHES Section 2 an MCE-log path on x86. v4's cover
  letter should say it follows separately.

C. Unification (ACPI tree, PCI ack for C2)
  Prep, no behavior change:
  C1 [7]    extlog_print_pcie() takes the HEST generic data
  C2 [5+6]  PCI/AER: aer_recover_queue() copies the registers, GHES drops
            the pool allocation. Squashed. Lukas's size objection
            <[email protected]> settled here.
  C3 [14]   cxl_cper_post_event() returns bool
  C4 [12a]  pure move into drivers/acpi/apei/extlog.c, old names and
            err_seq kept (Cameron <20261118200417.42034547@jic23-hlaptop>)
  C5 [12b]  atomic seqno, reason stated
  C6 [12c]  mem helpers, FRU computed once
  C7 [12d]  tracepoint Kconfig relaxation, CONFIG_RAS guards, drop the
            stale EXPORT_TRACEPOINT_SYMBOL_GPLs in drivers/ras/ras.c
  C8 [13]   share helpers with the common reporter (rest after A4)
  Behavior changes:
  C9  [8]   extlog queues PCIe errors for AER recovery. The message must
            say eMCA records now trigger pcie_do_recovery().
  C10 [15a] accept legacy 73-byte memory sections, with a reason and an
            FW_WARN on short sections to match GHES
  C11 [15b] ARM processor and CXL media in the common reporter. The
            message must state the CXL trace fallback when no consumer
            is registered.
  C12 [17]  share the extlog PCIe handler with GHES
  C13 [18]  route GHES section reporting through extlog. Justify the
            reporting-before-handling order and the double
            mc_event/extlog_mem_event.
  (C14) v4 08/12 extlog Mem2 trace event could land here, directly in the
        common reporter, instead of being added in v4 and then moved.

D. Policy, last and droppable (Boris
   <20261124050045.GOawUZ_S5imwUOyh8B@fat_crate.local>)
  D1 [9]  report independently of RAS consumers. Must deal with the
          suppressed MCE fallback print for non-fatal records.
  D2 [10] simplify fatal record printing
  D3 [11] deprecate ras_userspace_consumers() with a warning instead of
          removing it

Dependencies checked in the code:
  - C4 does not need D1. Patch 12's acpi_extlog.c hunk only swaps the
    section loop for acpi_extlog_report(tmp). With the daemon gate kept,
    extlog_print() calls it after the gate.
  - C9 needs C2. extlog passes a stack-local aer_regs, which is safe
    only once aer_recover_queue() copies the registers.
  - C9 needs A1. Otherwise [8] adds a second path to the NULL deref.
  - C11 needs C3 and C8. C12 needs C1, C2 and C9. C13 needs C11 and C12.
  - A4 needs ghes_severity() visible to acpi_extlog.c.
Not built in this order. The 12a-d and 15a/b splits need rework by the
author.


Reply via email to