On Fri, Aug 01, 2025 at 05:27:40PM -0700, Kees Cook wrote:
> With the few remaining fixes now landed, we can re-enable the option
> -Wunterminated-string-initialization for GCC. (Clang does not yet fully
> understand the "nonstring" attribute.)
> 
> Signed-off-by: Kees Cook <k...@kernel.org>

What else does Clang need? Are bugs filed? I had requested support for
multidimensional arrays, which Aaron implemented pretty quickly (and the
tests seem pretty expansive):

https://github.com/llvm/llvm-project/commit/e8ae77947154e10dbc05cbb95ec9e10d3b0be13e

> ---
> Cc: Masahiro Yamada <masahi...@kernel.org>
> Cc: Nathan Chancellor <nat...@kernel.org>
> Cc: Nicolas Schier <nicolas.sch...@linux.dev>
> Cc: <linux-kbu...@vger.kernel.org>
> ---
>  scripts/Makefile.extrawarn | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn
> index dca175fffcab..7ab8549485a4 100644
> --- a/scripts/Makefile.extrawarn
> +++ b/scripts/Makefile.extrawarn
> @@ -78,8 +78,10 @@ KBUILD_CFLAGS += $(call cc-option, -Wcast-function-type)
>  KBUILD_CFLAGS-$(CONFIG_CC_NO_STRINGOP_OVERFLOW) += $(call cc-option, 
> -Wno-stringop-overflow)
>  KBUILD_CFLAGS-$(CONFIG_CC_STRINGOP_OVERFLOW) += $(call cc-option, 
> -Wstringop-overflow)
>  
> +ifdef CONFIG_CC_IS_CLANG
>  # Currently, disable -Wunterminated-string-initialization as broken
>  KBUILD_CFLAGS += $(call cc-option, -Wno-unterminated-string-initialization)
> +endif
>  
>  # The allocators already balk at large sizes, so silence the compiler
>  # warnings for bounds checks involving those possible values. While
> -- 
> 2.34.1
> 

Reply via email to