lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJZ5v0iy8wChaPYGmc=mWJRrA+uXnGF2Ar7aMCMRoUqS6877aQ@mail.gmail.com>
Date: Tue, 21 Oct 2025 15:35:11 +0200
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Xi Ruoyao <xry111@...111.site>
Cc: "Rafael J . Wysocki" <rafael.j.wysocki@...el.com>, loongarch@...ts.linux.dev, 
	Mingcong Bai <jeffbai@...c.io>, Guenter Roeck <linux@...ck-us.net>, stable@...r.kernel.org, 
	Saket Dumbre <saket.dumbre@...el.com>, "Rafael J. Wysocki" <rafael@...nel.org>, 
	Robert Moore <robert.moore@...el.com>, Len Brown <lenb@...nel.org>, 
	Huacai Chen <chenhuacai@...nel.org>, 
	"open list:ACPI COMPONENT ARCHITECTURE (ACPICA)" <linux-acpi@...r.kernel.org>, 
	"open list:ACPI COMPONENT ARCHITECTURE (ACPICA)" <acpica-devel@...ts.linux.dev>, open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] acpica: Work around bogus -Wstringop-overread warning
 since GCC 11

On Tue, Oct 21, 2025 at 11:28 AM Xi Ruoyao <xry111@...111.site> wrote:
>
> When ACPI_MISALIGNMENT_NOT_SUPPORTED, GCC can produce a bogus
> -Wstringop-overread warning, see https://gcc.gnu.org/PR122073.
>
> To me it's very clear that we have a compiler bug here, thus just
> disable the warning.
>
> Cc: stable@...r.kernel.org
> Fixes: a9d13433fe17 ("LoongArch: Align ACPI structures if ARCH_STRICT_ALIGN enabled")
> Link: https://lore.kernel.org/all/899f2dec-e8b9-44f4-ab8d-001e160a2aed@roeck-us.net/
> Link: https://github.com/acpica/acpica/commit/abf5b573
> Co-developed-by: Saket Dumbre <saket.dumbre@...el.com>
> Signed-off-by: Saket Dumbre <saket.dumbre@...el.com>
> Signed-off-by: Xi Ruoyao <xry111@...111.site>

Please submit ACPICA changes to the upstream ACPICA project on GitHub
as pull requests (PRs).  After a given PR has been merged upstream, a
corresponding Linux patch can be submitted with a Link: tag pointing
to the upstream commit, but note that upstream ACPICA material is
automatically transferred to Linux, so it should not be necessary to
do so unless timing is important.

> ---
>  drivers/acpi/acpica/tbprint.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/drivers/acpi/acpica/tbprint.c b/drivers/acpi/acpica/tbprint.c
> index 049f6c2f1e32..e5631027f7f1 100644
> --- a/drivers/acpi/acpica/tbprint.c
> +++ b/drivers/acpi/acpica/tbprint.c
> @@ -95,6 +95,11 @@ acpi_tb_print_table_header(acpi_physical_address address,
>  {
>         struct acpi_table_header local_header;
>
> +#pragma GCC diagnostic push
> +#if defined(__GNUC__) && __GNUC__ >= 11
> +#pragma GCC diagnostic ignored "-Wstringop-overread"
> +#endif
> +
>         if (ACPI_COMPARE_NAMESEG(header->signature, ACPI_SIG_FACS)) {
>
>                 /* FACS only has signature and length fields */
> @@ -143,4 +148,5 @@ acpi_tb_print_table_header(acpi_physical_address address,
>                            local_header.asl_compiler_id,
>                            local_header.asl_compiler_revision));
>         }
> +#pragma GCC diagnostic pop
>  }
> --
> 2.51.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ