]> git.ipfire.org Git - thirdparty/linux.git/commit
compiler_types: Disable __builtin_counted_by_ref for Clang
authorKees Cook <kees@kernel.org>
Fri, 20 Feb 2026 21:15:58 +0000 (13:15 -0800)
committerKees Cook <kees@kernel.org>
Sat, 21 Feb 2026 09:01:14 +0000 (01:01 -0800)
commitd39a1d7486d98668dd34aaa6732aad7977c45f5a
treee3d0917dd485ceaca58f9c557550933a9acb2ab9
parentd79526b89571ae447c1a5cfd3d627efa07098348
compiler_types: Disable __builtin_counted_by_ref for Clang

Unfortunately, there is a corner case of __builtin_counted_by_ref()
usage that crashes[1] Clang since support was introduced in Clang 19.
Disable it prior to Clang 22. Found while tested kmalloc_obj treewide
refactoring (via kmalloc_flex() usage).

Link: https://github.com/llvm/llvm-project/issues/182575
Signed-off-by: Kees Cook <kees@kernel.org>
include/linux/compiler_types.h
init/Kconfig