From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796307833; b=cvv4Qu71BZgBPD2EKHFtTeikECDH1YCfV/UAt8qZiQwmr62+Cc/gVyEJijxVbca6WRto PjGSqKxoy+dfBXPwGa1WDx7le6gmKDSazkdvwjyi1kYP0lM1ndlbyE+8SObOW+71UlfVL /4MCRfZoD/A55WYpwHUetZRyJvD3kKB1hbHc7oWupbi8qqKTr9OXPnBQtkQGFk5oe4K5L 2KHsd/Gd9dWZuJNwZ314TyILza50CZjxSIn1J39gfmZN4m1cDUj5RxC/rZItO1tkaxAq/ 6u+/KzBjOJT6kHuSokpxMGZFFlrDPA/IiypEdDqh2GX7vr4Q7eXoWtbIrbiKimvEOIg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796307833; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=V/0yQU1GxUsMXgnWSiIMrPmvhhrXSJ8ZsCr4JnzEKcM=; b=wpLTy1xdhHNScSTP1jOuVMXzJR18Tru5ulO57idelQVN6Daw2R4n8Z19pccDF9WWOwK7 QZuge3MZE9yVp6SyYbSu4rxdFdM+r9Cs/LTBnGcAW9dAv70wkMgIoAqe/K92SJZ5mzKCn izDoTQpdolEqWAw2gw73hYlEEmGlgWKpMlDHARgh1fAYRdm+bOCSdiVln1cGvmmi0Q48C sYeN8GMlUfxRXBPVJ7DmC8AWiCoT+Qxdbp+wl+tR3mJckigNXu9eGf18RpxxXyBumuF/w RNdVLpt7tiewBBshLFR1UMixw4TXk+Cv7NWNTiIhKbx9tgWDvO3/sqh1thVAg5KFaUQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Vb8cW++M; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EDE43606A322; Thu, 3 Dec 2026 14:23:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Vb8cW++M Received: by smtp.kernel.org (Postfix) with ESMTPSA id 46CFB1F000C1; Thu, 3 Dec 2026 14:23:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796307832; bh=V/0yQU1GxUsMXgnWSiIMrPmvhhrXSJ8ZsCr4JnzEKcM=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=Vb8cW++Mr0nDKVlL5AjIqM5gA7YkL+86Cndz5bP7MdfQ++v86aZwfnb5yZRX8PD9T v5JxG9YhBuk3sDXCsFF+wHxOFDlDIW7c3hGWYLpCi9wqh4R3WEaEg2Kh/Ik4n9usSk cK9YLad1rqnmOFYZYGElyKjQPtdXS2vqtd0+YkOkje88R2VBhWBBZOfI6brPXttvMX 26fSSbm2jMVQmpOhXfFRrtglJb9vUho/OnReiAhQrIwoZ9mSsG/UbtRQAHmxGhw63a fiNQsIM9wuTHdNmrJxiS8MyGjwR3g/y1qt8ZmLcBYO/ZJZMxKRBXFnuBpWCnuAYA7N OaiJ/AFoBA4hw== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v8 20/22] ACPI: APEI: share GHES CPER helpers Reply-To: sashiko-reviews@lists.linux.dev To: "Ahmed Tiba" Cc: linux-cxl@vger.kernel.org, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org In-Reply-To: <20261203-topics-ahmtib01-ras_ffh_arm_internal_review-v8-20-157aac88560b@arm.com> References: <20261203-topics-ahmtib01-ras_ffh_arm_internal_review-v8-0-157aac88560b@arm.com> <20261203-topics-ahmtib01-ras_ffh_arm_internal_review-v8-20-157aac88560b@arm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Thu, 03 Dec 2026 14:23:51 +0000 X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 4 potential issues to consider: - [Medium] ACPI: APEI: KASAN workaround left on ghes.o after moving ghes_do_proc() - [Medium] ACPI: APEI: unconditional acpi/acpi_io.h include breaks non-ACPI builds - [Low] ACPI: APEI: ghes_report_chain moved without registration helpers - [Low] ACPI: APEI: unused generic param and globals in ghes_cper_handle_status() -- commit b4cf2660e10f22a18061dfcca8c5c5bef17e5dd0 Author: Ahmed Tiba ACPI: APEI: share GHES CPER helpers This commit moves the remaining GHES CPER status-processing and error-status pool helpers from ghes.c into ghes_cper.c, replacing ghes_do_proc() with a wrapper around ghes_cper_handle_status(). It also exports ghes_estatus_pool_init() and guards the ACPI APEI fixmap and GAR I/O helpers under CONFIG_ACPI_APEI. > diff --git a/drivers/acpi/apei/ghes_cper.c b/drivers/acpi/apei/ghes_cper.c > index 2037046d9be8b..bceac27ac2747 100644 > --- a/drivers/acpi/apei/ghes_cper.c > +++ b/drivers/acpi/apei/ghes_cper.c [ ... ] > @@ -21,11 +23,20 @@ [ ... ] > +#include > +#include > =20 > #include > #include [Severity: Medium] Should #include move inside #ifdef CONFIG_ACPI_APEI? Unlike linux/acpi.h, include/acpi/acpi_io.h unconditionally includes asm/acpi.h, which only exists on arm64, loongarch, riscv, and x86. Building ghes_cper.o without ACPI on other architectures (such as 32-bit ARM) fails to compile with a missing asm/acpi.h. > @@ -36,9 +47,500 @@ > =20 > #include "apei-internal.h" > =20 > +ATOMIC_NOTIFIER_HEAD(ghes_report_chain); [Severity: Low] Should ghes_register_report_chain() and ghes_unregister_report_chain() move to ghes_cper.c alongside ghes_report_chain? Leaving them in ghes.c forces ghes_report_chain to be non-static and declared extern in ghes_cper.h, and leaves non-ACPI builds (CONFIG_GHES_CPER_HELPERS without CONFIG_ACPI_APEI_GHES) with no way to register on ghes_report_chain even though ghes_cper_handle_status() calls it. The commit message also says it exports the notifier interfaces, though no notifier registration helper is moved or exported here. In addition, ghes_estatus_pool_init() is exported for modules while the companion CPER status-handling, printing, and notifier interfaces are not. [ ... ] > +void ghes_cper_handle_status(struct device *dev, > + const struct acpi_hest_generic *generic, > + const struct acpi_hest_generic_status *estatus, > + bool sync) [Severity: Medium] Does moving the body of ghes_do_proc() into ghes_cper.c reintroduce the Clang < 18 KASAN stack-frame build failure? Commit b584bfbd7ec4 ("ACPI: APEI: GHES: Disable KASAN instrumentation when compile testing with clang < 18") added KASAN_SANITIZE_ghes.o :=3D n in drivers/acpi/apei/Makefile because ghes_do_proc() exceeded the 2048-byte frame limit (2768 bytes) on ARCH=3Darm64 allmodconfig with CONFIG_KASAN and -Werror. ghes_do_proc() is now a two-line wrapper in ghes.c, while its body and CPER section handlers live in ghes_cper.o, built from drivers/Makefile without a KASAN_SANITIZE override. That leaves KASAN_SANITIZE_ghes.o :=3D n stale on ghes.o and re-exposes the -Wframe-larger-than failure on ghes_cper.o. [ ... ] > diff --git a/include/acpi/ghes_cper.h b/include/acpi/ghes_cper.h > index 5821eca46d63d..eb07ec98cc94f 100644 > --- a/include/acpi/ghes_cper.h > +++ b/include/acpi/ghes_cper.h [ ... ] > @@ -107,6 +110,23 @@ void ghes_estatus_cache_add(struct acpi_hest_generic= *generic, > struct acpi_hest_generic_status *estatus); > void ghes_defer_non_standard_event(struct acpi_hest_generic_data *gdata, > int sev); > +int ghes_severity(int severity); > +bool ghes_handle_memory_failure(struct acpi_hest_generic_data *gdata, > + int sev, bool sync); > +bool ghes_handle_arm_hw_error(struct acpi_hest_generic_data *gdata, > + int sev, bool sync); > +void ghes_handle_aer(struct acpi_hest_generic_data *gdata); > +void ghes_log_hwerr(int sev, guid_t *sec_type); > +void __ghes_print_estatus(const char *pfx, > + const struct acpi_hest_generic *generic, > + const struct acpi_hest_generic_status *estatus); > +int ghes_print_estatus(const char *pfx, > + const struct acpi_hest_generic *generic, > + const struct acpi_hest_generic_status *estatus); > +void ghes_cper_handle_status(struct device *dev, > + const struct acpi_hest_generic *generic, > + const struct acpi_hest_generic_status *estatus, > + bool sync); [Severity: Low] Can the unused generic parameter in ghes_cper_handle_status() be dropped? ghes_cper_handle_status() never references generic, which triggers -Wunused-parameter warnings under W=3D2 and forces non-ACPI callers to pass an unused ACPI HEST descriptor pointer. Also, ghes_handle_memory_failure(), ghes_handle_arm_hw_error(), ghes_handle_aer(), and ghes_log_hwerr() have no callers outside ghes_cper_handle_status() and can stay static instead of being declared in ghes_cper.h. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261203-topics-ahm= tib01-ras_ffh_arm_internal_review-v8-0-157aac88560b@arm.com?part=3D20