mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yazen Ghannam <yazen.ghannam@amd.com>
To: Pierre Gondois <pierre.gondois@arm.com>
Cc: linux-kernel@vger.kernel.org,
	Ashok Raj <ashok.raj@oss.qualcomm.com>,
	James Morse <james.morse@arm.com>,
	Mark Brown <broonie@kernel.org>,
	Thomas Gleixner <tglx@kernel.org>, Ingo Molnar <mingo@redhat.com>,
	Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Len Brown <lenb@kernel.org>, Tony Luck <tony.luck@intel.com>,
	Hanjun Guo <guohanjun@huawei.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Shuai Xue <xueshuai@linux.alibaba.com>,
	Mahesh J Salgaonkar <mahesh@linux.ibm.com>,
	Oliver O'Halloran <oohall@gmail.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>,
	Pawel Chmielewski <pawel.chmielewski@intel.com>,
	Radu Rendec <radu@rendec.net>,
	Avadhut Naik <avadhut.naik@amd.com>,
	Jonathan Cameron <jic23@kernel.org>,
	Kai-Heng Feng <kaihengf@nvidia.com>,
	Dave Jiang <dave.jiang@intel.com>,
	"Fabio M. De Francesco" <fabio.m.de.francesco@linux.intel.com>,
	Breno Leitao <leitao@debian.org>, Dan Williams <djbw@kernel.org>,
	Terry Bowman <terry.bowman@amd.com>,
	linux-acpi@vger.kernel.org, linux-edac@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org, linux-pci@vger.kernel.org,
	acpica-devel@lists.linux.dev
Subject: Re: [PATCH v1 00/19] ACPI: APEI: Share CPER reporting between GHES and extlog
Date: Tue, 24 Nov 2026 12:07:23 -0500	[thread overview]
Message-ID: <20261124170723.GE2156781@yaz-khff2.amd.com> (raw)
In-Reply-To: <20261117111444.4185512-1-pierre.gondois@arm.com>

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/20261113132600.3355836-1-pierre.gondois@arm.com/
> [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/20261113132600.3355836-1-pierre.gondois@arm.com/

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()
     <28da8229-99f9-47c7-b2d6-d301ae34253f@linux.intel.com> 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
            <avw-NChMgIjwFuv1@wunner.de> 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.


      parent reply	other threads:[~2026-11-24 17:08 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-17 11:10 Pierre Gondois
2026-11-17 11:10 ` [PATCH v1 01/19] x86/APEI: Extract common CPER memory error reporting helper Pierre Gondois
2026-11-18 18:54   ` Jonathan Cameron
2026-11-19 10:45     ` Pierre Gondois
2026-11-17 11:10 ` [PATCH v1 02/19] x86/APEI: Report Memory Error Section 2 through MCE Pierre Gondois
2026-11-18 18:57   ` Jonathan Cameron
2026-11-17 11:10 ` [PATCH v1 03/19] ras: Bound CPER FRU strings in trace events Pierre Gondois
2026-11-18 19:06   ` Jonathan Cameron
2026-11-17 11:10 ` [PATCH v1 04/19] ACPI: APEI: Use empty FRU values if valid bit is absent Pierre Gondois
2026-11-18 19:10   ` Jonathan Cameron
2026-11-17 11:10 ` [PATCH v1 05/19] PCI/AER: Embed aer_capability_regs copy in struct aer_recover_entry Pierre Gondois
2026-11-17 11:44   ` Lukas Wunner
2026-11-18 15:10     ` Pierre Gondois
2026-11-17 11:10 ` [PATCH v1 06/19] ACPI: APEI: Remove aer allocation in ghes_handle_aer() Pierre Gondois
2026-11-18 19:14   ` Jonathan Cameron
2026-11-17 11:10 ` [PATCH v1 07/19] ACPI: extlog: Provide HEST generic data to extlog_print_pcie() Pierre Gondois
2026-11-18 19:17   ` Jonathan Cameron
2026-11-17 11:10 ` [PATCH v1 08/19] ACPI: extlog: Align extlog_print_pcie() and ghes_handle_aer() Pierre Gondois
2026-11-18 19:29   ` Jonathan Cameron
2026-11-17 11:10 ` [PATCH v1 09/19] ACPI: extlog: Report errors independently of RAS consumers Pierre Gondois
2026-11-18 19:45   ` Jonathan Cameron
2026-11-24  5:00   ` Borislav Petkov
2026-11-17 11:10 ` [PATCH v1 10/19] ACPI: extlog: Simplify fatal record printing Pierre Gondois
2026-11-18 19:46   ` Jonathan Cameron
2026-11-17 11:10 ` [PATCH v1 11/19] RAS: Remove unused ras_userspace_consumers() Pierre Gondois
2026-11-18 19:49   ` Jonathan Cameron
2026-11-17 11:10 ` [PATCH v1 12/19] ACPI: extlog: Extract CPER reporting from acpi_extlog Pierre Gondois
2026-11-18 20:04   ` Jonathan Cameron
2026-11-17 11:10 ` [PATCH v1 13/19] ACPI: APEI: Share helpers with the common CPER reporter Pierre Gondois
2026-11-17 11:10 ` [PATCH v1 14/19] ACPI: APEI: Return status from cxl_cper_post_event() Pierre Gondois
2026-11-18 20:06   ` Jonathan Cameron
2026-11-17 11:10 ` [PATCH v1 15/19] ACPI: APEI: Extend common CPER reporting for GHES section types Pierre Gondois
2026-11-18 20:14   ` Jonathan Cameron
2026-11-17 11:10 ` [PATCH v1 16/19] ACPI: extlog: Report error severity using GHES bindings in MCE Pierre Gondois
2026-11-18 20:17   ` Jonathan Cameron
2026-11-17 11:10 ` [PATCH v1 17/19] ACPI: APEI: Share the extlog PCIe handler with GHES Pierre Gondois
2026-11-18 20:22   ` Jonathan Cameron
2026-11-17 11:10 ` [PATCH v1 18/19] ACPI: APEI: Route GHES section reporting through extlog Pierre Gondois
2026-11-18 20:30   ` Jonathan Cameron
2026-11-17 11:10 ` [PATCH v1 19/19] PCI/ERR: Avoid NULL bridge pointer Pierre Gondois
2026-11-17 11:50   ` Lukas Wunner
2026-11-17 18:57     ` Kuppuswamy Sathyanarayanan
2026-11-18 15:11       ` Pierre Gondois
2026-11-24 16:00         ` Yazen Ghannam
2026-11-24 17:07 ` Yazen Ghannam [this message]

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=20261124170723.GE2156781@yaz-khff2.amd.com \
    --to=yazen.ghannam@amd.com \
    --cc=acpica-devel@lists.linux.dev \
    --cc=ashok.raj@oss.qualcomm.com \
    --cc=avadhut.naik@amd.com \
    --cc=bhelgaas@google.com \
    --cc=bp@alien8.de \
    --cc=broonie@kernel.org \
    --cc=dave.hansen@linux.intel.com \
    --cc=dave.jiang@intel.com \
    --cc=djbw@kernel.org \
    --cc=fabio.m.de.francesco@linux.intel.com \
    --cc=guohanjun@huawei.com \
    --cc=hpa@zytor.com \
    --cc=james.morse@arm.com \
    --cc=jic23@kernel.org \
    --cc=kaihengf@nvidia.com \
    --cc=leitao@debian.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=maciej.wieczor-retman@intel.com \
    --cc=mahesh@linux.ibm.com \
    --cc=mchehab@kernel.org \
    --cc=mingo@redhat.com \
    --cc=oohall@gmail.com \
    --cc=pawel.chmielewski@intel.com \
    --cc=pierre.gondois@arm.com \
    --cc=radu@rendec.net \
    --cc=rafael@kernel.org \
    --cc=terry.bowman@amd.com \
    --cc=tglx@kernel.org \
    --cc=tony.luck@intel.com \
    --cc=x86@kernel.org \
    --cc=xueshuai@linux.alibaba.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®