]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Jun 2024 16:40:07 +0000 (18:40 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Jun 2024 16:40:07 +0000 (18:40 +0200)
added patches:
drm-radeon-fix-ubsan-warning-in-kv_dpm.c.patch
gcov-add-support-for-gcc-14.patch

queue-4.19/drm-radeon-fix-ubsan-warning-in-kv_dpm.c.patch [new file with mode: 0644]
queue-4.19/gcov-add-support-for-gcc-14.patch [new file with mode: 0644]
queue-4.19/series

diff --git a/queue-4.19/drm-radeon-fix-ubsan-warning-in-kv_dpm.c.patch b/queue-4.19/drm-radeon-fix-ubsan-warning-in-kv_dpm.c.patch
new file mode 100644 (file)
index 0000000..abac51d
--- /dev/null
@@ -0,0 +1,30 @@
+From a498df5421fd737d11bfd152428ba6b1c8538321 Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Mon, 20 May 2024 09:11:45 -0400
+Subject: drm/radeon: fix UBSAN warning in kv_dpm.c
+
+From: Alex Deucher <alexander.deucher@amd.com>
+
+commit a498df5421fd737d11bfd152428ba6b1c8538321 upstream.
+
+Adds bounds check for sumo_vid_mapping_entry.
+
+Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Cc: stable@vger.kernel.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/radeon/sumo_dpm.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/gpu/drm/radeon/sumo_dpm.c
++++ b/drivers/gpu/drm/radeon/sumo_dpm.c
+@@ -1622,6 +1622,8 @@ void sumo_construct_vid_mapping_table(st
+       for (i = 0; i < SUMO_MAX_HARDWARE_POWERLEVELS; i++) {
+               if (table[i].ulSupportedSCLK != 0) {
++                      if (table[i].usVoltageIndex >= SUMO_MAX_NUMBER_VOLTAGES)
++                              continue;
+                       vid_mapping_table->entries[table[i].usVoltageIndex].vid_7bit =
+                               table[i].usVoltageID;
+                       vid_mapping_table->entries[table[i].usVoltageIndex].vid_2bit =
diff --git a/queue-4.19/gcov-add-support-for-gcc-14.patch b/queue-4.19/gcov-add-support-for-gcc-14.patch
new file mode 100644 (file)
index 0000000..928df68
--- /dev/null
@@ -0,0 +1,40 @@
+From c1558bc57b8e5b4da5d821537cd30e2e660861d8 Mon Sep 17 00:00:00 2001
+From: Peter Oberparleiter <oberpar@linux.ibm.com>
+Date: Mon, 10 Jun 2024 11:27:43 +0200
+Subject: gcov: add support for GCC 14
+
+From: Peter Oberparleiter <oberpar@linux.ibm.com>
+
+commit c1558bc57b8e5b4da5d821537cd30e2e660861d8 upstream.
+
+Using gcov on kernels compiled with GCC 14 results in truncated 16-byte
+long .gcda files with no usable data.  To fix this, update GCOV_COUNTERS
+to match the value defined by GCC 14.
+
+Tested with GCC versions 14.1.0 and 13.2.0.
+
+Link: https://lkml.kernel.org/r/20240610092743.1609845-1-oberpar@linux.ibm.com
+Signed-off-by: Peter Oberparleiter <oberpar@linux.ibm.com>
+Reported-by: Allison Henderson <allison.henderson@oracle.com>
+Reported-by: Chuck Lever III <chuck.lever@oracle.com>
+Tested-by: Chuck Lever <chuck.lever@oracle.com>
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ kernel/gcov/gcc_4_7.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/kernel/gcov/gcc_4_7.c
++++ b/kernel/gcov/gcc_4_7.c
+@@ -19,7 +19,9 @@
+ #include <linux/vmalloc.h>
+ #include "gcov.h"
+-#if (__GNUC__ >= 10)
++#if (__GNUC__ >= 14)
++#define GCOV_COUNTERS                 9
++#elif (__GNUC__ >= 10)
+ #define GCOV_COUNTERS                 8
+ #elif (__GNUC__ >= 7)
+ #define GCOV_COUNTERS                 9
index 47edd68678b2e858541e0032e2892f891d96459d..d2c45659cc96457dba2d6071d646c5f4daafdbc1 100644 (file)
@@ -84,3 +84,5 @@ regulator-core-fix-modpost-error-regulator_get_regma.patch
 dmaengine-ioatdma-fix-missing-kmem_cache_destroy.patch
 acpica-revert-acpica-avoid-info-mapping-multiple-bar.patch
 mm-fix-race-between-__split_huge_pmd_locked-and-gup-fast.patch
+drm-radeon-fix-ubsan-warning-in-kv_dpm.c.patch
+gcov-add-support-for-gcc-14.patch