diff --git a/.github/workflows/kernel-arm64-release.config b/.github/workflows/kernel-arm64-release.config index 31797bac888cf3..2476670a0b3941 100644 --- a/.github/workflows/kernel-arm64-release.config +++ b/.github/workflows/kernel-arm64-release.config @@ -1375,7 +1375,7 @@ CONFIG_CC_HAS_SANCOV_TRACE_PC=y # Rust hacking # # CONFIG_RUST_DEBUG_ASSERTIONS is not set -# CONFIG_RUST_OVERFLOW_CHECKS is not set +CONFIG_RUST_OVERFLOW_CHECKS=y CONFIG_RUST_OPT_LEVEL_SIMILAR_AS_CHOSEN_FOR_C=y # CONFIG_RUST_OPT_LEVEL_0 is not set # CONFIG_RUST_OPT_LEVEL_1 is not set diff --git a/.github/workflows/kernel-ppc64le-release.config b/.github/workflows/kernel-ppc64le-release.config index fb61f0844fa5fe..a74314e6cdb86f 100644 --- a/.github/workflows/kernel-ppc64le-release.config +++ b/.github/workflows/kernel-ppc64le-release.config @@ -1483,7 +1483,7 @@ CONFIG_CC_HAS_SANCOV_TRACE_PC=y # Rust hacking # # CONFIG_RUST_DEBUG_ASSERTIONS is not set -# CONFIG_RUST_OVERFLOW_CHECKS is not set +CONFIG_RUST_OVERFLOW_CHECKS=y CONFIG_RUST_OPT_LEVEL_SIMILAR_AS_CHOSEN_FOR_C=y # CONFIG_RUST_OPT_LEVEL_0 is not set # CONFIG_RUST_OPT_LEVEL_1 is not set diff --git a/.github/workflows/kernel-x86_64-release.config b/.github/workflows/kernel-x86_64-release.config index 248606a672cbf2..5a9bc844a697ea 100644 --- a/.github/workflows/kernel-x86_64-release.config +++ b/.github/workflows/kernel-x86_64-release.config @@ -1425,7 +1425,7 @@ CONFIG_CC_HAS_SANCOV_TRACE_PC=y # Rust hacking # # CONFIG_RUST_DEBUG_ASSERTIONS is not set -# CONFIG_RUST_OVERFLOW_CHECKS is not set +CONFIG_RUST_OVERFLOW_CHECKS=y CONFIG_RUST_OPT_LEVEL_SIMILAR_AS_CHOSEN_FOR_C=y # CONFIG_RUST_OPT_LEVEL_0 is not set # CONFIG_RUST_OPT_LEVEL_1 is not set diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 9b68a331ade3f1..acf4993baddc48 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -2557,7 +2557,7 @@ config RUST_DEBUG_ASSERTIONS config RUST_OVERFLOW_CHECKS bool "Overflow checks" - default n + default y depends on RUST help Enables rustc's `-Coverflow-checks` codegen option. @@ -2568,7 +2568,7 @@ config RUST_OVERFLOW_CHECKS Note that this will apply to all Rust code, including `core`. - If unsure, say N. + If unsure, say Y. choice prompt "Optimization level"