mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pierre Gondois <pierre.gondois@arm.com>
To: Ashok Raj <ashok.raj@oss.qualcomm.com>
Cc: linux-kernel@vger.kernel.org, James Morse <james.morse@arm.com>,
	Mark Brown <broonie@kernel.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Len Brown <lenb@kernel.org>, Tony Luck <tony.luck@intel.com>,
	Borislav Petkov <bp@alien8.de>, Hanjun Guo <guohanjun@huawei.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Shuai Xue <xueshuai@linux.alibaba.com>,
	Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>,
	Pawel Chmielewski <pawel.chmielewski@intel.com>,
	Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>,
	Dave Jiang <dave.jiang@intel.com>,
	"Fabio M. De Francesco" <fabio.m.de.francesco@linux.intel.com>,
	Breno Leitao <leitao@debian.org>,
	Terry Bowman <terry.bowman@amd.com>,
	Dan Williams <djbw@kernel.org>, Ard Biesheuvel <ardb@kernel.org>,
	Morduan Zang <zhangdandan@uniontech.com>,
	linux-acpi@vger.kernel.org, linux-edac@vger.kernel.org,
	acpica-devel@lists.linux.dev,
	Ashok Raj <ashoraj@qti.qualcomm.com>,
	Jonathan Cameron <jic23@kernel.org>
Subject: Re: [PATCH v2 5/6] ACPI: APEI: add separate Memory Error Section 2 handlers
Date: Fri, 30 Oct 2026 11:55:00 +0100	[thread overview]
Message-ID: <0942cd90-51dc-44c5-8672-9ac647cae8e9@arm.com> (raw)
In-Reply-To: <at0oOH1Pma1MvFlU@hu-ashoraj-lv.qualcomm.com>

Hi Ashok,

On 10/24/26 23:50, Ashok Raj wrote:
> Hi Pierre,
>
>
> On Mon, Oct 19, 2026 at 10:38:44PM +0200, Pierre Gondois wrote:
>> Add dedicated GHES and EDAC callbacks for Memory Error Section 2
>> records. Use a separate GHES notifier chain so existing consumers
>> continue to receive legacy memory error sections.
>>
>> Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
>> ---
>>   drivers/acpi/apei/ghes.c |  49 +++++++++++++++-
>>   drivers/edac/ghes_edac.c | 118 +++++++++++++++++++++++++++++++++++++++
>>   include/acpi/ghes.h      |   2 +
>>   3 files changed, 168 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
>> index fe10ab0e02f6..c7fb15543b56 100644
>> --- a/drivers/acpi/apei/ghes.c
>> +++ b/drivers/acpi/apei/ghes.c
>> @@ -101,6 +101,7 @@
>>   #endif
>>
> [snip]
>
>> @@ -952,6 +977,16 @@ static void ghes_do_proc(struct ghes *ghes,
>>   
>>   			arch_apei_report_mem_error(sev, mem_err);
>>   			queued = ghes_handle_memory_failure(gdata, sev, sync);
> One issue here.
>
>> +		} else if (guid_equal(sec_type, &CPER_SEC_PLATFORM_MEM2)) {
>> +			struct cper_sec_mem_err2 *mem_err = acpi_hest_get_payload(gdata);
>> +
>> +			if (gdata->error_data_length < sizeof(*mem_err)) {
>> +				pr_warn(FW_WARN "Memory Error Section 2 length is too small\n");
>> +				continue;
>> +			}
>> +
>> +			atomic_notifier_call_chain(&ghes_report_mem2_chain, sev, mem_err);
>> +			queued = ghes_handle_memory_failure2(gdata, sev, sync);
> could this accumulate queued with |= ?
>
> queued describes whether any section in this GHES status record queued
> memory-failure work. The synchronous GHES path sends SIGBUS after the
> section loop when `!queued`.
>
> For example, a synchronous record can contain an eligible legacy memory
> section followed by a Memory Error Section 2 record without a valid
> physical address. The legacy section queues memory-failure work and sets
> queued, but the Section 2 handler returns false and this assignment clears
> the previous result. ghes_do_proc() then reaches the `sync && !queued`
> path and sends SIGBUS despite having queued recovery work for the earlier
> section.
>
> This series appears to be based before the queued accumulation fix [1].
> Could the new Memory Error Section 2 branch follow the same pattern?
>
>> +                     queued = ghes_handle_memory_failure2(gdata, sev, sync);
> should be:
>
>          queued |= ghes_handle_memory_failure2(gdata, sev, sync);
>
> Otherwise, an earlier section can queue memory-failure work, while a later
> Section 2 record for which no work is queued clears `queued`. For a
> synchronous GHES record, ghes_do_proc() will then reach `sync && !queued`
> and send SIGBUS despite recovery work having been queued for the earlier
> section.
>
> Thoughts?
>
> [1] https://lore.kernel.org/r/20260925-ghes-queued-accumulate-v1-1-df50553957d4@debian.org/
>
Ok sure, I will rebase the serie and do similar changes

  reply	other threads:[~2026-10-30 10:55 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-19 20:38 [PATCH v2 0/6] CPER: Add Memory Error Section 2 support Pierre Gondois
2026-10-19 20:38 ` [PATCH v2 1/6] cper: use BIT_ULL() for processor and memory validation bits Pierre Gondois
2026-10-19 20:38 ` [PATCH v2 2/6] cper: add Memory Error Section 2 structures Pierre Gondois
2026-10-19 20:38 ` [PATCH v2 3/6] cper: add helpers to handle Memory Error Section 2 Pierre Gondois
2026-10-19 20:38 ` [PATCH v2 4/6] EDAC/ghes: Extract error report initialization Pierre Gondois
2026-10-20 17:09   ` Jonathan Cameron
2026-10-30 11:37     ` Pierre Gondois
2026-10-19 20:38 ` [PATCH v2 5/6] ACPI: APEI: add separate Memory Error Section 2 handlers Pierre Gondois
2026-10-20 17:17   ` Jonathan Cameron
2026-10-24 21:50   ` Ashok Raj
2026-10-30 10:55     ` Pierre Gondois [this message]
2026-10-19 20:38 ` [PATCH v2 6/6] ACPI: extlog: add Memory Error Section 2 trace event Pierre Gondois
2026-10-24  0:09   ` Jonathan Cameron
2026-10-20 17:10 ` [PATCH v2 0/6] CPER: Add Memory Error Section 2 support Jonathan Cameron
2026-10-22  7:07   ` Pierre Gondois
2026-10-23 21:26     ` Jonathan Cameron
2026-10-23 22:40       ` Mauro Carvalho Chehab
2026-10-24  0:04         ` Jonathan Cameron
2026-10-24 22:05           ` Ashok Raj
2026-10-30 11:51             ` Pierre Gondois
2026-10-30 15:19               ` Jonathan Cameron
2026-10-30 17:16                 ` Pierre Gondois
2026-10-30 21:40                   ` Jonathan Cameron
2026-10-30 11:38           ` Pierre Gondois

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=0942cd90-51dc-44c5-8672-9ac647cae8e9@arm.com \
    --to=pierre.gondois@arm.com \
    --cc=acpica-devel@lists.linux.dev \
    --cc=ardb@kernel.org \
    --cc=ashok.raj@oss.qualcomm.com \
    --cc=ashoraj@qti.qualcomm.com \
    --cc=bp@alien8.de \
    --cc=broonie@kernel.org \
    --cc=dave.jiang@intel.com \
    --cc=djbw@kernel.org \
    --cc=fabio.m.de.francesco@linux.intel.com \
    --cc=guohanjun@huawei.com \
    --cc=james.morse@arm.com \
    --cc=jic23@kernel.org \
    --cc=jonathan.cameron@oss.qualcomm.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=maciej.wieczor-retman@intel.com \
    --cc=mchehab@kernel.org \
    --cc=pawel.chmielewski@intel.com \
    --cc=rafael@kernel.org \
    --cc=terry.bowman@amd.com \
    --cc=tony.luck@intel.com \
    --cc=xueshuai@linux.alibaba.com \
    --cc=zhangdandan@uniontech.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®