]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.1-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 May 2024 12:08:58 +0000 (14:08 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 May 2024 12:08:58 +0000 (14:08 +0200)
added patches:
arm64-atomics-lse-remove-stale-dependency-on-jump_label.patch
drm-amdgpu-fix-possible-null-dereference-in-amdgpu_ras_query_error_status_helper.patch

queue-6.1/arm64-atomics-lse-remove-stale-dependency-on-jump_label.patch [new file with mode: 0644]
queue-6.1/drm-amdgpu-fix-possible-null-dereference-in-amdgpu_ras_query_error_status_helper.patch [new file with mode: 0644]
queue-6.1/series

diff --git a/queue-6.1/arm64-atomics-lse-remove-stale-dependency-on-jump_label.patch b/queue-6.1/arm64-atomics-lse-remove-stale-dependency-on-jump_label.patch
new file mode 100644 (file)
index 0000000..220a782
--- /dev/null
@@ -0,0 +1,55 @@
+From 657eef0a5420a02c02945ed8c87f2ddcbd255772 Mon Sep 17 00:00:00 2001
+From: Mark Rutland <mark.rutland@arm.com>
+Date: Mon, 14 Nov 2022 12:54:24 +0000
+Subject: arm64: atomics: lse: remove stale dependency on JUMP_LABEL
+
+From: Mark Rutland <mark.rutland@arm.com>
+
+commit 657eef0a5420a02c02945ed8c87f2ddcbd255772 upstream.
+
+Currently CONFIG_ARM64_USE_LSE_ATOMICS depends upon CONFIG_JUMP_LABEL,
+as the inline atomics were indirected with a static branch.
+
+However, since commit:
+
+  21fb26bfb01ffe0d ("arm64: alternatives: add alternative_has_feature_*()")
+
+... we use an alternative_branch (which is always available) rather than
+a static branch, and hence the dependency is unnecessary.
+
+Remove the stale dependency, along with the stale include. This will
+allow the use of LSE atomics in kernels built with CONFIG_JUMP_LABEL=n,
+and reduces the risk of circular header dependencies via <asm/lse.h>.
+
+Signed-off-by: Mark Rutland <mark.rutland@arm.com>
+Cc: Catalin Marinas <catalin.marinas@arm.com>
+Cc: Will Deacon <will@kernel.org>
+Link: https://lore.kernel.org/r/20221114125424.2998268-1-mark.rutland@arm.com
+Signed-off-by: Will Deacon <will@kernel.org>
+Signed-off-by: Oleksandr Tymoshenko <ovt@google.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/arm64/Kconfig           |    1 -
+ arch/arm64/include/asm/lse.h |    1 -
+ 2 files changed, 2 deletions(-)
+
+--- a/arch/arm64/Kconfig
++++ b/arch/arm64/Kconfig
+@@ -1752,7 +1752,6 @@ config ARM64_LSE_ATOMICS
+ config ARM64_USE_LSE_ATOMICS
+       bool "Atomic instructions"
+-      depends on JUMP_LABEL
+       default y
+       help
+         As part of the Large System Extensions, ARMv8.1 introduces new
+--- a/arch/arm64/include/asm/lse.h
++++ b/arch/arm64/include/asm/lse.h
+@@ -10,7 +10,6 @@
+ #include <linux/compiler_types.h>
+ #include <linux/export.h>
+-#include <linux/jump_label.h>
+ #include <linux/stringify.h>
+ #include <asm/alternative.h>
+ #include <asm/alternative-macros.h>
diff --git a/queue-6.1/drm-amdgpu-fix-possible-null-dereference-in-amdgpu_ras_query_error_status_helper.patch b/queue-6.1/drm-amdgpu-fix-possible-null-dereference-in-amdgpu_ras_query_error_status_helper.patch
new file mode 100644 (file)
index 0000000..f99674b
--- /dev/null
@@ -0,0 +1,47 @@
+From b8d55a90fd55b767c25687747e2b24abd1ef8680 Mon Sep 17 00:00:00 2001
+From: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
+Date: Tue, 26 Dec 2023 15:32:19 +0530
+Subject: drm/amdgpu: Fix possible NULL dereference in amdgpu_ras_query_error_status_helper()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
+
+commit b8d55a90fd55b767c25687747e2b24abd1ef8680 upstream.
+
+Return invalid error code -EINVAL for invalid block id.
+
+Fixes the below:
+
+drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:1183 amdgpu_ras_query_error_status_helper() error: we previously assumed 'info' could be null (see line 1176)
+
+Suggested-by: Hawking Zhang <Hawking.Zhang@amd.com>
+Cc: Tao Zhou <tao.zhou1@amd.com>
+Cc: Hawking Zhang <Hawking.Zhang@amd.com>
+Cc: Christian König <christian.koenig@amd.com>
+Cc: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
+Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+[Ajay: applied AMDGPU_RAS_BLOCK_COUNT condition to amdgpu_ras_query_error_status()
+       as amdgpu_ras_query_error_status_helper() not present in v6.6, v6.1
+       amdgpu_ras_query_error_status_helper() was introduced in 8cc0f5669eb6]
+Signed-off-by: Ajay Kaher <ajay.kaher@broadcom.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
+@@ -974,6 +974,9 @@ int amdgpu_ras_query_error_status(struct
+       if (!obj)
+               return -EINVAL;
++      if (!info || info->head.block == AMDGPU_RAS_BLOCK_COUNT)
++              return -EINVAL;
++
+       if (info->head.block == AMDGPU_RAS_BLOCK__UMC) {
+               amdgpu_ras_get_ecc_info(adev, &err_data);
+       } else {
index 1538bc3e5dd6a3ee98ffe44d93cdf7cae292c676..ece6675853c02a845715019b573a83ae9ee5e8ea 100644 (file)
@@ -31,3 +31,5 @@ xfs-allow-inode-inactivation-during-a-ro-mount-log-recovery.patch
 xfs-fix-log-recovery-when-unknown-rocompat-bits-are-set.patch
 xfs-get-root-inode-correctly-at-bulkstat.patch
 xfs-short-circuit-xfs_growfs_data_private-if-delta-is-zero.patch
+arm64-atomics-lse-remove-stale-dependency-on-jump_label.patch
+drm-amdgpu-fix-possible-null-dereference-in-amdgpu_ras_query_error_status_helper.patch