]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
compiler.h: drop fallback overflow checkers
authorNick Desaulniers <ndesaulniers@google.com>
Fri, 12 Sep 2025 18:55:14 +0000 (18:55 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 Oct 2025 11:35:36 +0000 (13:35 +0200)
commit6a4e66854a3caaf18cee2b16c39e8ccbce49811b
tree9730cef5070060bb26b185ed582d6f1cc5b720d3
parent90b0b0bd012ae2b10ee42ba8738cc838c6d43695
compiler.h: drop fallback overflow checkers

[ Upstream commit 4eb6bd55cfb22ffc20652732340c4962f3ac9a91 ]

Once upgrading the minimum supported version of GCC to 5.1, we can drop
the fallback code for !COMPILER_HAS_GENERIC_BUILTIN_OVERFLOW.

This is effectively a revert of commit f0907827a8a9 ("compiler.h: enable
builtin overflow checkers and add fallback code")

Link: https://github.com/ClangBuiltLinux/linux/issues/1438#issuecomment-916745801
Suggested-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Acked-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Eliav Farber <farbere@amazon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/compiler-clang.h
include/linux/compiler-gcc.h
include/linux/overflow.h
tools/include/linux/compiler-gcc.h
tools/include/linux/overflow.h