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: <20250415190457.351e22a1@pumpkin>
Date: Tue, 15 Apr 2025 19:04:57 +0100
From: David Laight <david.laight.linux@...il.com>
To: Brahmajit Das <brahmajit.xyz@...il.com>
Cc: Robert Moore <robert.moore@...el.com>, "Rafael J. Wysocki"
 <rafael.j.wysocki@...el.com>, Len Brown <lenb@...nel.org>,
 linux-acpi@...r.kernel.org, acpica-devel@...ts.linux.dev,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] ACPI: Fix building with GCC 15

On Mon, 14 Apr 2025 21:46:42 +0530
Brahmajit Das <brahmajit.xyz@...il.com> wrote:

> Since the Linux kernel initializes many non-C-string char arrays with
> literals. While it would be possible to convert initializers from:
>    { "BOOP", ... }
> to something like:
>    { { 'B', 'O', 'O', 'P' }, ... }
> that is annoying.
> Making -Wunterminated-string-initialization stay silent about char
> arrays marked with nonstring would be much better.
...
> diff --git a/drivers/acpi/acpica/aclocal.h b/drivers/acpi/acpica/aclocal.h
> index 6f4fe47c955b..d2cda1b35e59 100644
> --- a/drivers/acpi/acpica/aclocal.h
> +++ b/drivers/acpi/acpica/aclocal.h
> @@ -293,7 +293,7 @@ acpi_status (*acpi_internal_method) (struct acpi_walk_state * walk_state);
>   * expected_return_btypes - Allowed type(s) for the return value
>   */
>  struct acpi_name_info {
> -	char name[ACPI_NAMESEG_SIZE];
> +	char name[ACPI_NAMESEG_SIZE] __attribute__((nonstring));

Doesn't than generate an 'unknown attribute' error on older compilers?

Does:
	typedef char char_nonstring __attribute__((nonstring));
	char_nonstring name[4] = "abcd";
work?

If so the attribute could even be applied to 'u8'.

	David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ