From: Greg Kroah-Hartman Date: Mon, 10 Feb 2025 15:04:10 +0000 (+0100) Subject: 5.15-stable patches X-Git-Tag: v6.6.77~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4edd6d1e5438ff4a74fbf760ce28fae82ad69a47;p=thirdparty%2Fkernel%2Fstable-queue.git 5.15-stable patches added patches: arm64-dts-qcom-sm8350-fix-mpss-memory-length.patch crypto-qce-fix-priority-to-be-less-than-armv8-ce.patch x86-boot-use-std-gnu11-to-fix-build-with-gcc-15.patch xfs-add-error-handling-for-xfs_reflink_cancel_cow_range.patch --- diff --git a/queue-5.15/arm64-dts-qcom-sm8350-fix-mpss-memory-length.patch b/queue-5.15/arm64-dts-qcom-sm8350-fix-mpss-memory-length.patch new file mode 100644 index 0000000000..9636970520 --- /dev/null +++ b/queue-5.15/arm64-dts-qcom-sm8350-fix-mpss-memory-length.patch @@ -0,0 +1,39 @@ +From da1937dec9cd986e685b6a429b528a4cbc7b1603 Mon Sep 17 00:00:00 2001 +From: Krzysztof Kozlowski +Date: Fri, 13 Dec 2024 15:53:52 +0100 +Subject: arm64: dts: qcom: sm8350: Fix MPSS memory length + +From: Krzysztof Kozlowski + +commit da1937dec9cd986e685b6a429b528a4cbc7b1603 upstream. + +The address space in MPSS/Modem PAS (Peripheral Authentication Service) +remoteproc node should point to the QDSP PUB address space +(QDSP6...SS_PUB) which has a length of 0x10000. Value of 0x4040 was +copied from older DTS, but it grew since then. + +This should have no functional impact on Linux users, because PAS loader +does not use this address space at all. + +Fixes: 177fcf0aeda2 ("arm64: dts: qcom: sm8350: Add remoteprocs") +Cc: stable@vger.kernel.org +Reviewed-by: Konrad Dybcio +Signed-off-by: Krzysztof Kozlowski +Link: https://lore.kernel.org/r/20241213-dts-qcom-cdsp-mpss-base-address-v3-3-2e0036fccd8d@linaro.org +Signed-off-by: Bjorn Andersson +Signed-off-by: Greg Kroah-Hartman +--- + arch/arm64/boot/dts/qcom/sm8350.dtsi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/arm64/boot/dts/qcom/sm8350.dtsi ++++ b/arch/arm64/boot/dts/qcom/sm8350.dtsi +@@ -754,7 +754,7 @@ + + mpss: remoteproc@4080000 { + compatible = "qcom,sm8350-mpss-pas"; +- reg = <0x0 0x04080000 0x0 0x4040>; ++ reg = <0x0 0x04080000 0x0 0x10000>; + + interrupts-extended = <&intc GIC_SPI 264 IRQ_TYPE_LEVEL_HIGH>, + <&smp2p_modem_in 0 IRQ_TYPE_EDGE_RISING>, diff --git a/queue-5.15/crypto-qce-fix-priority-to-be-less-than-armv8-ce.patch b/queue-5.15/crypto-qce-fix-priority-to-be-less-than-armv8-ce.patch new file mode 100644 index 0000000000..40ca3009d4 --- /dev/null +++ b/queue-5.15/crypto-qce-fix-priority-to-be-less-than-armv8-ce.patch @@ -0,0 +1,64 @@ +From 49b9258b05b97c6464e1964b6a2fddb3ddb65d17 Mon Sep 17 00:00:00 2001 +From: Eric Biggers +Date: Tue, 3 Dec 2024 10:05:53 -0800 +Subject: crypto: qce - fix priority to be less than ARMv8 CE + +From: Eric Biggers + +commit 49b9258b05b97c6464e1964b6a2fddb3ddb65d17 upstream. + +As QCE is an order of magnitude slower than the ARMv8 Crypto Extensions +on the CPU, and is also less well tested, give it a lower priority. +Previously the QCE SHA algorithms had higher priority than the ARMv8 CE +equivalents, and the ciphers such as AES-XTS had the same priority which +meant the QCE versions were chosen if they happened to be loaded later. + +Fixes: ec8f5d8f6f76 ("crypto: qce - Qualcomm crypto engine driver") +Cc: stable@vger.kernel.org +Cc: Bartosz Golaszewski +Cc: Neil Armstrong +Cc: Thara Gopinath +Signed-off-by: Eric Biggers +Reviewed-by: Bartosz Golaszewski +Reviewed-by: Ard Biesheuvel +Signed-off-by: Herbert Xu +Signed-off-by: Greg Kroah-Hartman +--- + drivers/crypto/qce/aead.c | 2 +- + drivers/crypto/qce/sha.c | 2 +- + drivers/crypto/qce/skcipher.c | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +--- a/drivers/crypto/qce/aead.c ++++ b/drivers/crypto/qce/aead.c +@@ -786,7 +786,7 @@ static int qce_aead_register_one(const s + alg->init = qce_aead_init; + alg->exit = qce_aead_exit; + +- alg->base.cra_priority = 300; ++ alg->base.cra_priority = 275; + alg->base.cra_flags = CRYPTO_ALG_ASYNC | + CRYPTO_ALG_ALLOCATES_MEMORY | + CRYPTO_ALG_KERN_DRIVER_ONLY | +--- a/drivers/crypto/qce/sha.c ++++ b/drivers/crypto/qce/sha.c +@@ -480,7 +480,7 @@ static int qce_ahash_register_one(const + + base = &alg->halg.base; + base->cra_blocksize = def->blocksize; +- base->cra_priority = 300; ++ base->cra_priority = 175; + base->cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_KERN_DRIVER_ONLY; + base->cra_ctxsize = sizeof(struct qce_sha_ctx); + base->cra_alignmask = 0; +--- a/drivers/crypto/qce/skcipher.c ++++ b/drivers/crypto/qce/skcipher.c +@@ -461,7 +461,7 @@ static int qce_skcipher_register_one(con + alg->encrypt = qce_skcipher_encrypt; + alg->decrypt = qce_skcipher_decrypt; + +- alg->base.cra_priority = 300; ++ alg->base.cra_priority = 275; + alg->base.cra_flags = CRYPTO_ALG_ASYNC | + CRYPTO_ALG_ALLOCATES_MEMORY | + CRYPTO_ALG_KERN_DRIVER_ONLY; diff --git a/queue-5.15/series b/queue-5.15/series index b927fc5460..f4dbbff0a0 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -304,3 +304,7 @@ nvme-pci-add-tuxedo-ibp-gen9-to-samsung-sleep-quirk.patch scsi-qla2xxx-move-fce-trace-buffer-allocation-to-user-control.patch scsi-storvsc-set-correct-data-length-for-sending-scsi-command-without-payload.patch kbuild-move-wenum-enum-conversion-to-w-2.patch +x86-boot-use-std-gnu11-to-fix-build-with-gcc-15.patch +arm64-dts-qcom-sm8350-fix-mpss-memory-length.patch +crypto-qce-fix-priority-to-be-less-than-armv8-ce.patch +xfs-add-error-handling-for-xfs_reflink_cancel_cow_range.patch diff --git a/queue-5.15/x86-boot-use-std-gnu11-to-fix-build-with-gcc-15.patch b/queue-5.15/x86-boot-use-std-gnu11-to-fix-build-with-gcc-15.patch new file mode 100644 index 0000000000..802cb0aa3d --- /dev/null +++ b/queue-5.15/x86-boot-use-std-gnu11-to-fix-build-with-gcc-15.patch @@ -0,0 +1,52 @@ +From ee2ab467bddfb2d7f68d996dbab94d7b88f8eaf7 Mon Sep 17 00:00:00 2001 +From: Nathan Chancellor +Date: Tue, 21 Jan 2025 18:11:33 -0700 +Subject: x86/boot: Use '-std=gnu11' to fix build with GCC 15 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Nathan Chancellor + +commit ee2ab467bddfb2d7f68d996dbab94d7b88f8eaf7 upstream. + +GCC 15 changed the default C standard version to C23, which should not +have impacted the kernel because it requests the gnu11 standard via +'-std=' in the main Makefile. However, the x86 compressed boot Makefile +uses its own set of KBUILD_CFLAGS without a '-std=' value (i.e., using +the default), resulting in errors from the kernel's definitions of bool, +true, and false in stddef.h, which are reserved keywords under C23. + + ./include/linux/stddef.h:11:9: error: expected identifier before ‘false’ + 11 | false = 0, + ./include/linux/types.h:35:33: error: two or more data types in declaration specifiers + 35 | typedef _Bool bool; + +Set '-std=gnu11' in the x86 compressed boot Makefile to resolve the +error and consistently use the same C standard version for the entire +kernel. + +Closes: https://lore.kernel.org/4OAhbllK7x4QJGpZjkYjtBYNLd_2whHx9oFiuZcGwtVR4hIzvduultkgfAIRZI3vQpZylu7Gl929HaYFRGeMEalWCpeMzCIIhLxxRhq4U-Y=@protonmail.com/ +Closes: https://lore.kernel.org/Z4467umXR2PZ0M1H@tucnak/ +Reported-by: Kostadin Shishmanov +Reported-by: Jakub Jelinek +Signed-off-by: Nathan Chancellor +Signed-off-by: Dave Hansen +Reviewed-by: Ard Biesheuvel +Cc:stable@vger.kernel.org +Link: https://lore.kernel.org/all/20250121-x86-use-std-consistently-gcc-15-v1-1-8ab0acf645cb%40kernel.org +Signed-off-by: Greg Kroah-Hartman +--- + arch/x86/boot/compressed/Makefile | 1 + + 1 file changed, 1 insertion(+) + +--- a/arch/x86/boot/compressed/Makefile ++++ b/arch/x86/boot/compressed/Makefile +@@ -33,6 +33,7 @@ targets := vmlinux vmlinux.bin vmlinux.b + # avoid errors with '-march=i386', and future flags may depend on the target to + # be valid. + KBUILD_CFLAGS := -m$(BITS) -O2 $(CLANG_FLAGS) ++KBUILD_CFLAGS += -std=gnu11 + KBUILD_CFLAGS += -fno-strict-aliasing -fPIE + KBUILD_CFLAGS += -Wundef + KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING diff --git a/queue-5.15/xfs-add-error-handling-for-xfs_reflink_cancel_cow_range.patch b/queue-5.15/xfs-add-error-handling-for-xfs_reflink_cancel_cow_range.patch new file mode 100644 index 0000000000..7e8020226c --- /dev/null +++ b/queue-5.15/xfs-add-error-handling-for-xfs_reflink_cancel_cow_range.patch @@ -0,0 +1,42 @@ +From 26b63bee2f6e711c5a169997fd126fddcfb90848 Mon Sep 17 00:00:00 2001 +From: Wentao Liang +Date: Fri, 24 Jan 2025 11:45:09 +0800 +Subject: xfs: Add error handling for xfs_reflink_cancel_cow_range + +From: Wentao Liang + +commit 26b63bee2f6e711c5a169997fd126fddcfb90848 upstream. + +In xfs_inactive(), xfs_reflink_cancel_cow_range() is called +without error handling, risking unnoticed failures and +inconsistent behavior compared to other parts of the code. + +Fix this issue by adding an error handling for the +xfs_reflink_cancel_cow_range(), improving code robustness. + +Fixes: 6231848c3aa5 ("xfs: check for cow blocks before trying to clear them") +Cc: stable@vger.kernel.org # v4.17 +Reviewed-by: Darrick J. Wong +Signed-off-by: Wentao Liang +Signed-off-by: Carlos Maiolino +Signed-off-by: Greg Kroah-Hartman +--- + fs/xfs/xfs_inode.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +--- a/fs/xfs/xfs_inode.c ++++ b/fs/xfs/xfs_inode.c +@@ -1748,8 +1748,11 @@ xfs_inactive( + goto out; + + /* Try to clean out the cow blocks if there are any. */ +- if (xfs_inode_has_cow_data(ip)) +- xfs_reflink_cancel_cow_range(ip, 0, NULLFILEOFF, true); ++ if (xfs_inode_has_cow_data(ip)) { ++ error = xfs_reflink_cancel_cow_range(ip, 0, NULLFILEOFF, true); ++ if (error) ++ goto out; ++ } + + if (VFS_I(ip)->i_nlink != 0) { + /*