public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* FAILED: patch "[PATCH] lib/Kconfig.ubsan: Remove 'default UBSAN' from" failed to apply to 6.14-stable tree
@ 2025-04-21 13:55 gregkh
  2025-04-21 15:40 ` [PATCH 6.14] lib/Kconfig.ubsan: Remove 'default UBSAN' from UBSAN_INTEGER_WRAP Nathan Chancellor
  2025-04-23 17:25 ` [PATCH 6.14 v2] " Nathan Chancellor
  0 siblings, 2 replies; 9+ messages in thread
From: gregkh @ 2025-04-21 13:55 UTC (permalink / raw)
  To: nathan, kees; +Cc: stable


The patch below does not apply to the 6.14-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.

To reproduce the conflict and resubmit, you may use the following commands:

git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.14.y
git checkout FETCH_HEAD
git cherry-pick -x cdc2e1d9d929d7f7009b3a5edca52388a2b0891f
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable@vger.kernel.org>' --in-reply-to '2025042119-imbecile-greeter-0ce1@gregkh' --subject-prefix 'PATCH 6.14.y' HEAD^..

Possible dependencies:



thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From cdc2e1d9d929d7f7009b3a5edca52388a2b0891f Mon Sep 17 00:00:00 2001
From: Nathan Chancellor <nathan@kernel.org>
Date: Mon, 14 Apr 2025 15:00:59 -0700
Subject: [PATCH] lib/Kconfig.ubsan: Remove 'default UBSAN' from
 UBSAN_INTEGER_WRAP

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 <nathan@kernel.org>
Link: https://lore.kernel.org/r/20250414-drop-default-ubsan-integer-wrap-v1-1-392522551d6b@kernel.org
Signed-off-by: Kees Cook <kees@kernel.org>

diff --git a/lib/Kconfig.ubsan b/lib/Kconfig.ubsan
index 4216b3a4ff21..f6ea0c5b5da3 100644
--- a/lib/Kconfig.ubsan
+++ b/lib/Kconfig.ubsan
@@ -118,7 +118,6 @@ config UBSAN_UNREACHABLE
 
 config UBSAN_INTEGER_WRAP
 	bool "Perform checking for integer arithmetic wrap-around"
-	default UBSAN
 	depends on !COMPILE_TEST
 	depends on $(cc-option,-fsanitize-undefined-ignore-overflow-pattern=all)
 	depends on $(cc-option,-fsanitize=signed-integer-overflow)


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 6.14] lib/Kconfig.ubsan: Remove 'default UBSAN' from UBSAN_INTEGER_WRAP
  2025-04-21 13:55 FAILED: patch "[PATCH] lib/Kconfig.ubsan: Remove 'default UBSAN' from" failed to apply to 6.14-stable tree gregkh
@ 2025-04-21 15:40 ` Nathan Chancellor
  2025-04-22  2:15   ` Sasha Levin
  2025-04-22  7:20   ` Greg KH
  2025-04-23 17:25 ` [PATCH 6.14 v2] " Nathan Chancellor
  1 sibling, 2 replies; 9+ messages in thread
From: Nathan Chancellor @ 2025-04-21 15:40 UTC (permalink / raw)
  To: gregkh, sashal; +Cc: stable, nathan, kees

commit ed2b548f1017586c44f50654ef9febb42d491f31 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 <nathan@kernel.org>
Link: https://lore.kernel.org/r/20250414-drop-default-ubsan-integer-wrap-v1-1-392522551d6b@kernel.org
Signed-off-by: Kees Cook <kees@kernel.org>
[nathan: Fix conflict due to lack of rename from ed2b548f1017 in stable]
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
 lib/Kconfig.ubsan | 1 -
 1 file changed, 1 deletion(-)

diff --git a/lib/Kconfig.ubsan b/lib/Kconfig.ubsan
index 1d4aa7a83b3a..37655f58b855 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

base-commit: d12acd7bc3d4ca813dc2360e6f5ca6bb1682c290
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 6.14] lib/Kconfig.ubsan: Remove 'default UBSAN' from UBSAN_INTEGER_WRAP
  2025-04-21 15:40 ` [PATCH 6.14] lib/Kconfig.ubsan: Remove 'default UBSAN' from UBSAN_INTEGER_WRAP Nathan Chancellor
@ 2025-04-22  2:15   ` Sasha Levin
  2025-04-22  7:20   ` Greg KH
  1 sibling, 0 replies; 9+ messages in thread
From: Sasha Levin @ 2025-04-22  2:15 UTC (permalink / raw)
  To: stable; +Cc: Nathan Chancellor, Sasha Levin

[ Sasha's backport helper bot ]

Hi,

✅ All tests passed successfully. No issues detected.
No action required from the submitter.

The upstream commit SHA1 provided is correct: ed2b548f1017586c44f50654ef9febb42d491f31

WARNING: Author mismatch between patch and upstream commit:
Backport author: Nathan Chancellor<nathan@kernel.org>
Commit author: Kees Cook<kees@kernel.org>

Note: The patch differs from the upstream commit:
---
1:  ed2b548f10175 < -:  ------------- ubsan/overflow: Rework integer overflow sanitizer option to turn on everything
-:  ------------- > 1:  a1c5f5e8b07ed lib/Kconfig.ubsan: Remove 'default UBSAN' from UBSAN_INTEGER_WRAP
---

Results of testing on various branches:

| Branch                    | Patch Apply | Build Test |
|---------------------------|-------------|------------|
| stable/linux-6.14.y       |  Success    |  Success   |

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 6.14] lib/Kconfig.ubsan: Remove 'default UBSAN' from UBSAN_INTEGER_WRAP
  2025-04-21 15:40 ` [PATCH 6.14] lib/Kconfig.ubsan: Remove 'default UBSAN' from UBSAN_INTEGER_WRAP Nathan Chancellor
  2025-04-22  2:15   ` Sasha Levin
@ 2025-04-22  7:20   ` Greg KH
  2025-04-22 16:59     ` Kees Cook
  1 sibling, 1 reply; 9+ messages in thread
From: Greg KH @ 2025-04-22  7:20 UTC (permalink / raw)
  To: Nathan Chancellor; +Cc: sashal, stable, kees

On Mon, Apr 21, 2025 at 08:40:59AM -0700, Nathan Chancellor wrote:
> commit ed2b548f1017586c44f50654ef9febb42d491f31 upstream.

Wrong git id :(


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 6.14] lib/Kconfig.ubsan: Remove 'default UBSAN' from UBSAN_INTEGER_WRAP
  2025-04-22  7:20   ` Greg KH
@ 2025-04-22 16:59     ` Kees Cook
  2025-04-22 19:10       ` Nathan Chancellor
  0 siblings, 1 reply; 9+ messages in thread
From: Kees Cook @ 2025-04-22 16:59 UTC (permalink / raw)
  To: Greg KH; +Cc: Nathan Chancellor, sashal, stable

On Tue, Apr 22, 2025 at 09:20:41AM +0200, Greg KH wrote:
> On Mon, Apr 21, 2025 at 08:40:59AM -0700, Nathan Chancellor wrote:
> > commit ed2b548f1017586c44f50654ef9febb42d491f31 upstream.
> 
> Wrong git id :(

Should be cdc2e1d9d929d7f7009b3a5edca52388a2b0891f

(ed2b548f1017586c44f50654ef9febb42d491f31 is what was fixed, I assume a
paste-o)

-- 
Kees Cook

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 6.14] lib/Kconfig.ubsan: Remove 'default UBSAN' from UBSAN_INTEGER_WRAP
  2025-04-22 16:59     ` Kees Cook
@ 2025-04-22 19:10       ` Nathan Chancellor
  2025-04-23  6:11         ` Greg KH
  0 siblings, 1 reply; 9+ messages in thread
From: Nathan Chancellor @ 2025-04-22 19:10 UTC (permalink / raw)
  To: Kees Cook; +Cc: Greg KH, sashal, stable

On Tue, Apr 22, 2025 at 09:59:40AM -0700, Kees Cook wrote:
> On Tue, Apr 22, 2025 at 09:20:41AM +0200, Greg KH wrote:
> > On Mon, Apr 21, 2025 at 08:40:59AM -0700, Nathan Chancellor wrote:
> > > commit ed2b548f1017586c44f50654ef9febb42d491f31 upstream.
> > 
> > Wrong git id :(
> 
> Should be cdc2e1d9d929d7f7009b3a5edca52388a2b0891f
> 
> (ed2b548f1017586c44f50654ef9febb42d491f31 is what was fixed, I assume a
> paste-o)

Indeed a paste-o or maybe a copy-o depending on how you look at it :P

If that cannot be fixed up easily, I can send a v2.

Cheers,
Nathan

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 6.14] lib/Kconfig.ubsan: Remove 'default UBSAN' from UBSAN_INTEGER_WRAP
  2025-04-22 19:10       ` Nathan Chancellor
@ 2025-04-23  6:11         ` Greg KH
  0 siblings, 0 replies; 9+ messages in thread
From: Greg KH @ 2025-04-23  6:11 UTC (permalink / raw)
  To: Nathan Chancellor; +Cc: Kees Cook, sashal, stable

On Tue, Apr 22, 2025 at 12:10:20PM -0700, Nathan Chancellor wrote:
> On Tue, Apr 22, 2025 at 09:59:40AM -0700, Kees Cook wrote:
> > On Tue, Apr 22, 2025 at 09:20:41AM +0200, Greg KH wrote:
> > > On Mon, Apr 21, 2025 at 08:40:59AM -0700, Nathan Chancellor wrote:
> > > > commit ed2b548f1017586c44f50654ef9febb42d491f31 upstream.
> > > 
> > > Wrong git id :(
> > 
> > Should be cdc2e1d9d929d7f7009b3a5edca52388a2b0891f
> > 
> > (ed2b548f1017586c44f50654ef9febb42d491f31 is what was fixed, I assume a
> > paste-o)
> 
> Indeed a paste-o or maybe a copy-o depending on how you look at it :P
> 
> If that cannot be fixed up easily, I can send a v2.

Please send a v2.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 6.14 v2] lib/Kconfig.ubsan: Remove 'default UBSAN' from UBSAN_INTEGER_WRAP
  2025-04-21 13:55 FAILED: patch "[PATCH] lib/Kconfig.ubsan: Remove 'default UBSAN' from" failed to apply to 6.14-stable tree gregkh
  2025-04-21 15:40 ` [PATCH 6.14] lib/Kconfig.ubsan: Remove 'default UBSAN' from UBSAN_INTEGER_WRAP Nathan Chancellor
@ 2025-04-23 17:25 ` Nathan Chancellor
  2025-04-24 13:26   ` Sasha Levin
  1 sibling, 1 reply; 9+ messages in thread
From: Nathan Chancellor @ 2025-04-23 17:25 UTC (permalink / raw)
  To: gregkh, sashal; +Cc: stable, nathan, kees

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 <nathan@kernel.org>
Link: https://lore.kernel.org/r/20250414-drop-default-ubsan-integer-wrap-v1-1-392522551d6b@kernel.org
Signed-off-by: Kees Cook <kees@kernel.org>
[nathan: Fix conflict due to lack of rename from ed2b548f1017 in stable]
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
v1 -> v2: Correct upstream ID
---
 lib/Kconfig.ubsan | 1 -
 1 file changed, 1 deletion(-)

diff --git a/lib/Kconfig.ubsan b/lib/Kconfig.ubsan
index 1d4aa7a83b3a..37655f58b855 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

base-commit: d12acd7bc3d4ca813dc2360e6f5ca6bb1682c290
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 6.14 v2] lib/Kconfig.ubsan: Remove 'default UBSAN' from UBSAN_INTEGER_WRAP
  2025-04-23 17:25 ` [PATCH 6.14 v2] " Nathan Chancellor
@ 2025-04-24 13:26   ` Sasha Levin
  0 siblings, 0 replies; 9+ messages in thread
From: Sasha Levin @ 2025-04-24 13:26 UTC (permalink / raw)
  To: stable; +Cc: Nathan Chancellor, Sasha Levin

[ Sasha's backport helper bot ]

Hi,

✅ All tests passed successfully. No issues detected.
No action required from the submitter.

The upstream commit SHA1 provided is correct: cdc2e1d9d929d7f7009b3a5edca52388a2b0891f

Note: The patch differs from the upstream commit:
---
1:  cdc2e1d9d929d < -:  ------------- lib/Kconfig.ubsan: Remove 'default UBSAN' from UBSAN_INTEGER_WRAP
-:  ------------- > 1:  57a6c70084dfd lib/Kconfig.ubsan: Remove 'default UBSAN' from UBSAN_INTEGER_WRAP
---

Results of testing on various branches:

| Branch                    | Patch Apply | Build Test |
|---------------------------|-------------|------------|
| stable/linux-6.14.y       |  Success    |  Success   |

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-04-24 13:26 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-21 13:55 FAILED: patch "[PATCH] lib/Kconfig.ubsan: Remove 'default UBSAN' from" failed to apply to 6.14-stable tree gregkh
2025-04-21 15:40 ` [PATCH 6.14] lib/Kconfig.ubsan: Remove 'default UBSAN' from UBSAN_INTEGER_WRAP Nathan Chancellor
2025-04-22  2:15   ` Sasha Levin
2025-04-22  7:20   ` Greg KH
2025-04-22 16:59     ` Kees Cook
2025-04-22 19:10       ` Nathan Chancellor
2025-04-23  6:11         ` Greg KH
2025-04-23 17:25 ` [PATCH 6.14 v2] " Nathan Chancellor
2025-04-24 13:26   ` Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox