Re: [PATCH] fortify: Disable -Wstringop-overread in tests

Kees Cook <[email protected]>
Newsgroups dev.linux.lists.llvm,org.kernel.vger.linux-hardening,org.kernel.vger.linux-kernel,org.kernel.vger.stable
Message-ID <[email protected]>
On Tue, 23 Jun 2026 13:23:46 -0700, Nathan Chancellor wrote:
> clang recently added support for -Wstringop-overread [1], which is on by
> default like -Wfortify-source. This breaks the usage of -Werror in the
> fortify tests, resulting in the following false positive warnings in the
> kernel build:
> 
>   warning: unsafe memcmp() usage lacked '__read_overflow2' warning in lib/test_fortify/read_overflow2-memcmp.c
>   warning: unsafe memcmp() usage lacked '__read_overflow' warning in lib/test_fortify/read_overflow-memcmp.c
>   warning: unsafe memchr() usage lacked '__read_overflow' warning in lib/test_fortify/read_overflow-memchr.c
> 
> [...]

Applied to for-next/hardening, thanks!

[1/1] fortify: Disable -Wstringop-overread in tests
      https://git.kernel.org/kees/c/c1f3e770eec2

Take care,

-- 
Kees Cook
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.