]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 11 Apr 2022 13:36:06 +0000 (15:36 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 11 Apr 2022 13:36:06 +0000 (15:36 +0200)
added patches:
dmaengine-revert-dmaengine-shdma-fix-runtime-pm-imbalance-on-error.patch
ubsan-remove-config_ubsan_object_size.patch

queue-5.10/dmaengine-revert-dmaengine-shdma-fix-runtime-pm-imbalance-on-error.patch [new file with mode: 0644]
queue-5.10/series
queue-5.10/ubsan-remove-config_ubsan_object_size.patch [new file with mode: 0644]

diff --git a/queue-5.10/dmaengine-revert-dmaengine-shdma-fix-runtime-pm-imbalance-on-error.patch b/queue-5.10/dmaengine-revert-dmaengine-shdma-fix-runtime-pm-imbalance-on-error.patch
new file mode 100644 (file)
index 0000000..55997c1
--- /dev/null
@@ -0,0 +1,33 @@
+From d143f939a95696d38ff800ada14402fa50ebbd6c Mon Sep 17 00:00:00 2001
+From: Vinod Koul <vkoul@kernel.org>
+Date: Thu, 10 Mar 2022 10:13:20 +0530
+Subject: dmaengine: Revert "dmaengine: shdma: Fix runtime PM imbalance on error"
+
+From: Vinod Koul <vkoul@kernel.org>
+
+commit d143f939a95696d38ff800ada14402fa50ebbd6c upstream.
+
+This reverts commit 455896c53d5b ("dmaengine: shdma: Fix runtime PM
+imbalance on error") as the patch wrongly reduced the count on error and
+did not bail out. So drop the count by reverting the patch .
+
+Signed-off-by: Vinod Koul <vkoul@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/dma/sh/shdma-base.c |    4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+--- a/drivers/dma/sh/shdma-base.c
++++ b/drivers/dma/sh/shdma-base.c
+@@ -115,10 +115,8 @@ static dma_cookie_t shdma_tx_submit(stru
+               ret = pm_runtime_get(schan->dev);
+               spin_unlock_irq(&schan->chan_lock);
+-              if (ret < 0) {
++              if (ret < 0)
+                       dev_err(schan->dev, "%s(): GET = %d\n", __func__, ret);
+-                      pm_runtime_put(schan->dev);
+-              }
+               pm_runtime_barrier(schan->dev);
index a36e8704dbd3355d7a93a8f90b53ab5f9abe2ec8..0b05bdd029152c985db86f69c5a42921d2abea94 100644 (file)
@@ -156,3 +156,5 @@ perf-build-don-t-use-ffat-lto-objects-in-the-python-feature-test-when-building-w
 perf-python-fix-probing-for-some-clang-command-line-options.patch
 tools-build-filter-out-options-and-warnings-not-supported-by-clang.patch
 tools-build-use-shell-instead-of-to-get-embedded-libperl-s-ccopts.patch
+dmaengine-revert-dmaengine-shdma-fix-runtime-pm-imbalance-on-error.patch
+ubsan-remove-config_ubsan_object_size.patch
diff --git a/queue-5.10/ubsan-remove-config_ubsan_object_size.patch b/queue-5.10/ubsan-remove-config_ubsan_object_size.patch
new file mode 100644 (file)
index 0000000..836dea6
--- /dev/null
@@ -0,0 +1,76 @@
+From 69d0db01e210e07fe915e5da91b54a867cda040f Mon Sep 17 00:00:00 2001
+From: Kees Cook <keescook@chromium.org>
+Date: Wed, 19 Jan 2022 18:10:35 -0800
+Subject: ubsan: remove CONFIG_UBSAN_OBJECT_SIZE
+
+From: Kees Cook <keescook@chromium.org>
+
+commit 69d0db01e210e07fe915e5da91b54a867cda040f upstream.
+
+The object-size sanitizer is redundant to -Warray-bounds, and
+inappropriately performs its checks at run-time when all information
+needed for the evaluation is available at compile-time, making it quite
+difficult to use:
+
+  https://bugzilla.kernel.org/show_bug.cgi?id=214861
+
+With -Warray-bounds almost enabled globally, it doesn't make sense to
+keep this around.
+
+Link: https://lkml.kernel.org/r/20211203235346.110809-1-keescook@chromium.org
+Signed-off-by: Kees Cook <keescook@chromium.org>
+Reviewed-by: Marco Elver <elver@google.com>
+Cc: Masahiro Yamada <masahiroy@kernel.org>
+Cc: Michal Marek <michal.lkml@markovi.net>
+Cc: Nick Desaulniers <ndesaulniers@google.com>
+Cc: Nathan Chancellor <nathan@kernel.org>
+Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
+Cc: "Peter Zijlstra (Intel)" <peterz@infradead.org>
+Cc: Stephen Rothwell <sfr@canb.auug.org.au>
+Cc: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Tadeusz Struk <tadeusz.struk@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ lib/test_ubsan.c       |   11 -----------
+ scripts/Makefile.ubsan |    1 -
+ 2 files changed, 12 deletions(-)
+
+--- a/lib/test_ubsan.c
++++ b/lib/test_ubsan.c
+@@ -89,16 +89,6 @@ static void test_ubsan_misaligned_access
+       *ptr = val;
+ }
+-static void test_ubsan_object_size_mismatch(void)
+-{
+-      /* "((aligned(8)))" helps this not into be misaligned for ptr-access. */
+-      volatile int val __aligned(8) = 4;
+-      volatile long long *ptr, val2;
+-
+-      ptr = (long long *)&val;
+-      val2 = *ptr;
+-}
+-
+ static const test_ubsan_fp test_ubsan_array[] = {
+       test_ubsan_add_overflow,
+       test_ubsan_sub_overflow,
+@@ -110,7 +100,6 @@ static const test_ubsan_fp test_ubsan_ar
+       test_ubsan_load_invalid_value,
+       //test_ubsan_null_ptr_deref, /* exclude it because there is a crash */
+       test_ubsan_misaligned_access,
+-      test_ubsan_object_size_mismatch,
+ };
+ static int __init test_ubsan_init(void)
+--- a/scripts/Makefile.ubsan
++++ b/scripts/Makefile.ubsan
+@@ -23,7 +23,6 @@ ifdef CONFIG_UBSAN_MISC
+       CFLAGS_UBSAN += $(call cc-option, -fsanitize=integer-divide-by-zero)
+       CFLAGS_UBSAN += $(call cc-option, -fsanitize=unreachable)
+       CFLAGS_UBSAN += $(call cc-option, -fsanitize=signed-integer-overflow)
+-      CFLAGS_UBSAN += $(call cc-option, -fsanitize=object-size)
+       CFLAGS_UBSAN += $(call cc-option, -fsanitize=bool)
+       CFLAGS_UBSAN += $(call cc-option, -fsanitize=enum)
+ endif