Re: [PATCH v4 00/12] CPER: Add Memory Error Section 2 support
From: Yazen Ghannam
Date: Wed Nov 25 2026 - 11:58:38 EST
On Wed, Nov 25, 2026 at 05:30:18PM +0100, Pierre Gondois wrote:
> Hello Yazen,
>
> On 11/24/26 16:14, Yazen Ghannam wrote:
> > On Fri, Nov 13, 2026 at 02:24:42PM +0100, Pierre Gondois wrote:
> > > The support is mostly duplicated from Memory Error Section handling.
> > > Other than differences coming from the content of Memory Error
> > > Section 1 and 2, differences in the support are:
> > >
> > > - v2 do not rely on a compact "struct cper_mem_err_compact" struct.
> > > This structure was used to support older versions of the Memory
> > > Error Section (1). This is not needed for the new structure.
> > >
> > > - The compact version is also used by the tracing framework.
> > > To avoid relying and propagating a non-standard record format,
> > > through trace event (cf. extlog_mem event) the new trace event
> > > prints each field individually.
> > >
> > > The last patch of the serie was only build-tested due to the
> > > absence of relevant hardware. apei_mce_report_mem_error() and
> > > arch_apei_report_mem_error() implementations were also removed since
> > > last version.
> > >
> > > It will also require a proper handling from the rasdaemon. Applying
> > > this last patch without rasdaemon support will silent the reports of
> > > Memory Error Section 2 error, cf. ras_userspace_consumers() check.
> > >
> > > Future:
> > > - _OSC support (if agreed)
> > > - Addition of arm64 tracepoints
> > > https://lore.kernel.org/lkml/20261023170405.000060b8@xxxxxxxxxxxxxxxx/
> > > - Emission of lossy CPER Mem error v1 tracepoints for legacy userspace
> > > tools
> > > https://lore.kernel.org/lkml/at0rs4parlHFGI7k@xxxxxxxxxxxxxxxxxxxxxxxxxx/
> > >
> > >
> > > RFC:https://lore.kernel.org/all/20260929074659.2587216-1-pierre.gondois@xxxxxxx/#t
> > > V1:https://lore.kernel.org/all/20261019145643.1877246-1-pierre.gondois@xxxxxxx/
> > > - Corrections from Jonathan's review
> > > - New patch:
> > > [PATCH v2 4/6] EDAC/ghes: Extract error report initialization
> > > - Last patch not in RFC as it has been reviewed by Jonathan@
> > > [PATCH v2 6/6] ACPI: extlog: add Memory Error Section 2 trace event
> > > V2:
> > > - Updated ghes_edac_init_error() to ghes_edac_init_error_desc(),
> > > which now only acts on the input "struct edac_raw_error_desc"
> > > + added lockdep_assert_held() to ghes_edac_init_error_desc()
> > > - Accumulate failures with "queued |=" in ghes_do_proc()
> > > - New PATCH:
> > > [PATCH v3 5/7] ACPI: APEI: Extract common memory failure handling
> > >
> > > V3:
> > > - Added <linux/bits.h> include
> > > - Used pr_warn_rate_limited()
> > > - Removed one warn for smbios handle overflow
> > > - Replaced __string() -> __string_len() in trace event
> > >
> > > Added patch to us scnprintf():
> > > - cper: Return actual bytes written by DIMM location helpers
> > > Added patches to increase buffer size and prevent overflows:
> > > - EDAC/ghes: Small buffer fixes for mem other_detail helpers
> > > - efi/cper: Pass buffer length to memory location helpers
> > > - efi/cper: Pass buffer length to DIMM location helpers
> > >
> > > Pierre Gondois (12):
> > > cper: use BIT_ULL() for processor and memory validation bits
> > > cper: add Memory Error Section 2 structures
> > > cper: add helpers to handle Memory Error Section 2
> > > cper: Return actual bytes written by DIMM location helpers
> > Why not use 'efi/cper' for these ^^^ ?
> >
> Right, I'll update it
>
>
> > > EDAC/ghes: Extract error report initialization
> > > ACPI: APEI: Extract common memory failure handling
> > > ACPI: APEI: add separate Memory Error Section 2 handlers
> > > ACPI: extlog: add Memory Error Section 2 trace event
> > > efi/cper: Pass buffer length to DIMM location helpers
> > > efi/cper: Pass buffer length to memory location helpers
> > > EDAC/ghes: Small buffer fixes for mem other_detail helpers
> > > efi/cper: Increase memory error location and detail buffer sizes
> > >
> > Boris already mentioned having fixes go first. I think the common
> > convention is to have "fixes > refactoring > new feature" order. I asked
> > an LLM assistant to propose a new patch order (copied at the end). Some
> > patches would need to be split/reworked, so it's not a strict 1-to-1
> > reordering. I hope this helps.
>
> I thought sending fixes/refactor/new features separately would
> make it more difficult to understand where the patchset wanted
> to go, as the refactoring part is usually preparing for the new
> feature. E.g. B2 +B3 only make sense if v4.7 ("ACPI: APEI: add separate
> Memory Error Section 2 handlers") is applied.
>
> But if you both prefer it in split series I can do it sure.
>
I didn't mean to split the series necessarily. Though you could do that.
That may make more sense for any independent fixes.
I meant that some of the individual patches may need to be broken up and
rearranged into new patches.
Thanks,
Yazen