From: Greg Kroah-Hartman Date: Mon, 11 Apr 2022 13:36:06 +0000 (+0200) Subject: 5.10-stable patches X-Git-Tag: v4.9.310~34 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=683bebf968d31a618852600b9712ecb19faf56e0;p=thirdparty%2Fkernel%2Fstable-queue.git 5.10-stable patches added patches: dmaengine-revert-dmaengine-shdma-fix-runtime-pm-imbalance-on-error.patch ubsan-remove-config_ubsan_object_size.patch --- 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 index 00000000000..55997c153d4 --- /dev/null +++ b/queue-5.10/dmaengine-revert-dmaengine-shdma-fix-runtime-pm-imbalance-on-error.patch @@ -0,0 +1,33 @@ +From d143f939a95696d38ff800ada14402fa50ebbd6c Mon Sep 17 00:00:00 2001 +From: Vinod Koul +Date: Thu, 10 Mar 2022 10:13:20 +0530 +Subject: dmaengine: Revert "dmaengine: shdma: Fix runtime PM imbalance on error" + +From: Vinod Koul + +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 +Signed-off-by: Greg Kroah-Hartman +--- + 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); + diff --git a/queue-5.10/series b/queue-5.10/series index a36e8704dbd..0b05bdd0291 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -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 index 00000000000..836dea69a68 --- /dev/null +++ b/queue-5.10/ubsan-remove-config_ubsan_object_size.patch @@ -0,0 +1,76 @@ +From 69d0db01e210e07fe915e5da91b54a867cda040f Mon Sep 17 00:00:00 2001 +From: Kees Cook +Date: Wed, 19 Jan 2022 18:10:35 -0800 +Subject: ubsan: remove CONFIG_UBSAN_OBJECT_SIZE + +From: Kees Cook + +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 +Reviewed-by: Marco Elver +Cc: Masahiro Yamada +Cc: Michal Marek +Cc: Nick Desaulniers +Cc: Nathan Chancellor +Cc: Andrey Ryabinin +Cc: "Peter Zijlstra (Intel)" +Cc: Stephen Rothwell +Cc: Arnd Bergmann +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Tadeusz Struk +Signed-off-by: Greg Kroah-Hartman +--- + 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