]> git.ipfire.org Git - thirdparty/linux.git/commit
kunit/fortify: Expand testing of __compiletime_strlen()
authorKees Cook <kees@kernel.org>
Wed, 12 Mar 2025 00:03:56 +0000 (17:03 -0700)
committerKees Cook <kees@kernel.org>
Wed, 12 Mar 2025 20:23:52 +0000 (13:23 -0700)
commit416cf1f4d91bf52305cd160a382273ccef980b7f
treed79e53626533effbe522ce556c48998517befb1b
parentd985e4399adffb58e10b38dbb5479ef29d53cde6
kunit/fortify: Expand testing of __compiletime_strlen()

It seems that Clang thinks __builtin_constant_p() of undefined variables
should return true[1]. This is being fixed separately[2], but in the
meantime, expand the fortify tests to help track this kind of thing down
faster in the future.

Link: https://github.com/ClangBuiltLinux/linux/issues/2073
Link: https://github.com/llvm/llvm-project/pull/130713
Link: https://lore.kernel.org/r/20250312000349.work.786-kees@kernel.org
Signed-off-by: Kees Cook <kees@kernel.org>
lib/tests/fortify_kunit.c