Skip to content

Commit 76ae847

Browse files
nickdesaulnierstorvalds
authored andcommitted
Documentation: raise minimum supported version of GCC to 5.1
commit fad7cd3 ("nbd: add the check to prevent overflow in __nbd_ioctl()") raised an issue from the fallback helpers added in commit f090782 ("compiler.h: enable builtin overflow checkers and add fallback code") Specifically, the helpers for checking whether the results of a multiplication overflowed (__unsigned_mul_overflow, __signed_add_overflow) use the division operator when !COMPILER_HAS_GENERIC_BUILTIN_OVERFLOW. This is problematic for 64b operands on 32b hosts. Also, because the macro is type agnostic, it is very difficult to write a similarly type generic macro that dispatches to one of: * div64_s64 * div64_u64 * div_s64 * div_u64 Raising the minimum supported versions allows us to remove all of the fallback helpers for !COMPILER_HAS_GENERIC_BUILTIN_OVERFLOW, instead dispatching the compiler builtins. arm64 has already raised the minimum supported GCC version to 5.1, do this for all targets now. See the link below for the previous discussion. Link: https://lore.kernel.org/all/[email protected]/ Link: https://lore.kernel.org/lkml/CAK7LNASs6dvU6D3jL2GG3jW58fXfaj6VNOe55NJnTB8UPuk2pA@mail.gmail.com/ Link: ClangBuiltLinux#1438 Reported-by: Stephen Rothwell <[email protected]> Reported-by: Nathan Chancellor <[email protected]> Suggested-by: Rasmus Villemoes <[email protected]> Signed-off-by: Nick Desaulniers <[email protected]> Reviewed-by: Kees Cook <[email protected]> Reviewed-by: Nathan Chancellor <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 2d33820 commit 76ae847

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

Documentation/process/changes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ you probably needn't concern yourself with pcmciautils.
2929
====================== =============== ========================================
3030
Program Minimal version Command to check the version
3131
====================== =============== ========================================
32-
GNU C 4.9 gcc --version
32+
GNU C 5.1 gcc --version
3333
Clang/LLVM (optional) 10.0.1 clang --version
3434
GNU make 3.81 make --version
3535
binutils 2.23 ld -v

scripts/min-tool-version.sh

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,7 @@ binutils)
1717
echo 2.23.0
1818
;;
1919
gcc)
20-
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63293
21-
# https://lore.kernel.org/r/[email protected]
22-
if [ "$SRCARCH" = arm64 ]; then
23-
echo 5.1.0
24-
else
25-
echo 4.9.0
26-
fi
20+
echo 5.1.0
2721
;;
2822
icc)
2923
# temporary

0 commit comments

Comments
 (0)