]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ubsan/overflow: Enable pattern exclusions
authorKees Cook <kees@kernel.org>
Fri, 7 Mar 2025 04:19:10 +0000 (20:19 -0800)
committerKees Cook <kees@kernel.org>
Sat, 8 Mar 2025 03:58:05 +0000 (19:58 -0800)
commit272a767063a6856cd1e18bb951d2be4f047b9858
treee99ada54422457cb1fa3bda50028254279f56706
parented2b548f1017586c44f50654ef9febb42d491f31
ubsan/overflow: Enable pattern exclusions

To make integer wrap-around mitigation actually useful, the associated
sanitizers must not instrument cases where the wrap-around is explicitly
defined (e.g. "-2UL"), being tested for (e.g. "if (a + b < a)"), or
where it has no impact on code flow (e.g. "while (var--)"). Enable
pattern exclusions for the integer wrap sanitizers.

Reviewed-by: Justin Stitt <justinstitt@google.com>
Link: https://lore.kernel.org/r/20250307041914.937329-2-kees@kernel.org
Signed-off-by: Kees Cook <kees@kernel.org>
lib/Kconfig.ubsan
scripts/Makefile.ubsan