From df1b6e2fa935b96d0df2fe2d59d33a73b4433853 Mon Sep 17 00:00:00 2001 From: Sasha Levin Date: Sat, 26 Apr 2025 10:58:37 -0400 Subject: [PATCH] Fixes for 6.14 Signed-off-by: Sasha Levin --- ...n-remove-default-ubsan-from-ubsan_in.patch | 55 +++++++++++++++++++ queue-6.14/series | 1 + 2 files changed, 56 insertions(+) create mode 100644 queue-6.14/lib-kconfig.ubsan-remove-default-ubsan-from-ubsan_in.patch diff --git a/queue-6.14/lib-kconfig.ubsan-remove-default-ubsan-from-ubsan_in.patch b/queue-6.14/lib-kconfig.ubsan-remove-default-ubsan-from-ubsan_in.patch new file mode 100644 index 0000000000..5a3e94ae30 --- /dev/null +++ b/queue-6.14/lib-kconfig.ubsan-remove-default-ubsan-from-ubsan_in.patch @@ -0,0 +1,55 @@ +From 9b176419db9fca50b98b7ae88ce86b4bc2f39a8d Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 23 Apr 2025 10:25:05 -0700 +Subject: lib/Kconfig.ubsan: Remove 'default UBSAN' from UBSAN_INTEGER_WRAP + +From: Nathan Chancellor + +commit cdc2e1d9d929d7f7009b3a5edca52388a2b0891f upstream. + +CONFIG_UBSAN_INTEGER_WRAP is 'default UBSAN', which is problematic for a +couple of reasons. + +The first is that this sanitizer is under active development on the +compiler side to come up with a solution that is maintainable on the +compiler side and usable on the kernel side. As a result of this, there +are many warnings when the sanitizer is enabled that have no clear path +to resolution yet but users may see them and report them in the meantime. + +The second is that this option was renamed from +CONFIG_UBSAN_SIGNED_WRAP, meaning that if a configuration has +CONFIG_UBSAN=y but CONFIG_UBSAN_SIGNED_WRAP=n and it is upgraded via +olddefconfig (common in non-interactive scenarios such as CI), +CONFIG_UBSAN_INTEGER_WRAP will be silently enabled again. + +Remove 'default UBSAN' from CONFIG_UBSAN_INTEGER_WRAP until it is ready +for regular usage and testing from a broader community than the folks +actively working on the feature. + +Cc: stable@vger.kernel.org +Fixes: 557f8c582a9b ("ubsan: Reintroduce signed overflow sanitizer") +Signed-off-by: Nathan Chancellor +Link: https://lore.kernel.org/r/20250414-drop-default-ubsan-integer-wrap-v1-1-392522551d6b@kernel.org +Signed-off-by: Kees Cook +[nathan: Fix conflict due to lack of rename from ed2b548f1017 in stable] +Signed-off-by: Nathan Chancellor +Signed-off-by: Sasha Levin +--- + lib/Kconfig.ubsan | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/lib/Kconfig.ubsan b/lib/Kconfig.ubsan +index 1d4aa7a83b3a5..37655f58b8554 100644 +--- a/lib/Kconfig.ubsan ++++ b/lib/Kconfig.ubsan +@@ -118,7 +118,6 @@ config UBSAN_UNREACHABLE + + config UBSAN_SIGNED_WRAP + bool "Perform checking for signed arithmetic wrap-around" +- default UBSAN + depends on !COMPILE_TEST + # The no_sanitize attribute was introduced in GCC with version 8. + depends on !CC_IS_GCC || GCC_VERSION >= 80000 +-- +2.39.5 + diff --git a/queue-6.14/series b/queue-6.14/series index c96f8d1a18..41f7915b0c 100644 --- a/queue-6.14/series +++ b/queue-6.14/series @@ -29,3 +29,4 @@ drm-xe-xe3lpg-add-wa_13012615864.patch drm-xe-add-performance-tunings-to-debugfs.patch drm-xe-rtp-drop-sentinels-from-arg-to-xe_rtp_process.patch drm-xe-ensure-fixed_slice_mode-gets-set-after-ccs_mo.patch +lib-kconfig.ubsan-remove-default-ubsan-from-ubsan_in.patch -- 2.47.3