]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.12-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 22 Dec 2024 07:41:47 +0000 (08:41 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 22 Dec 2024 07:41:47 +0000 (08:41 +0100)
added patches:
drm-amdgpu-nbio7.11-fix-ip-version-check.patch
drm-amdgpu-nbio7.7-fix-ip-version-check.patch
drm-amdgpu-smu14.0.2-fix-ip-version-check.patch
trace-ring-buffer-do-not-use-tp_printk-formatting-for-boot-mapped-buffers.patch

queue-6.12/drm-amdgpu-nbio7.11-fix-ip-version-check.patch [new file with mode: 0644]
queue-6.12/drm-amdgpu-nbio7.7-fix-ip-version-check.patch [new file with mode: 0644]
queue-6.12/drm-amdgpu-smu14.0.2-fix-ip-version-check.patch [new file with mode: 0644]
queue-6.12/series
queue-6.12/trace-ring-buffer-do-not-use-tp_printk-formatting-for-boot-mapped-buffers.patch [new file with mode: 0644]

diff --git a/queue-6.12/drm-amdgpu-nbio7.11-fix-ip-version-check.patch b/queue-6.12/drm-amdgpu-nbio7.11-fix-ip-version-check.patch
new file mode 100644 (file)
index 0000000..d636aa7
--- /dev/null
@@ -0,0 +1,31 @@
+From 8c1ecc7197a88c6ae62de56e1c0887f220712a32 Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Thu, 12 Dec 2024 17:00:07 -0500
+Subject: drm/amdgpu/nbio7.11: fix IP version check
+
+From: Alex Deucher <alexander.deucher@amd.com>
+
+commit 8c1ecc7197a88c6ae62de56e1c0887f220712a32 upstream.
+
+Use the helper function rather than reading it directly.
+
+Reviewed-by: Yang Wang <kevinyang.wang@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+(cherry picked from commit 2c8eeaaa0fe5841ccf07a0eb51b1426f34ef39f7)
+Cc: stable@vger.kernel.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/amd/amdgpu/nbio_v7_11.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/amd/amdgpu/nbio_v7_11.c
++++ b/drivers/gpu/drm/amd/amdgpu/nbio_v7_11.c
+@@ -275,7 +275,7 @@ static void nbio_v7_11_init_registers(st
+       if (def != data)
+               WREG32_SOC15(NBIO, 0, regBIF_BIF256_CI256_RC3X4_USB4_PCIE_MST_CTRL_3, data);
+-      switch (adev->ip_versions[NBIO_HWIP][0]) {
++      switch (amdgpu_ip_version(adev, NBIO_HWIP, 0)) {
+       case IP_VERSION(7, 11, 0):
+       case IP_VERSION(7, 11, 1):
+       case IP_VERSION(7, 11, 2):
diff --git a/queue-6.12/drm-amdgpu-nbio7.7-fix-ip-version-check.patch b/queue-6.12/drm-amdgpu-nbio7.7-fix-ip-version-check.patch
new file mode 100644 (file)
index 0000000..4547acb
--- /dev/null
@@ -0,0 +1,31 @@
+From 458600da793da12e0f3724ecbea34a80703f4d5b Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Thu, 12 Dec 2024 16:47:48 -0500
+Subject: drm/amdgpu/nbio7.7: fix IP version check
+
+From: Alex Deucher <alexander.deucher@amd.com>
+
+commit 458600da793da12e0f3724ecbea34a80703f4d5b upstream.
+
+Use the helper function rather than reading it directly.
+
+Reviewed-by: Yang Wang <kevinyang.wang@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+(cherry picked from commit 22b9555bc90df22b585bdd1f161b61584b13af51)
+Cc: stable@vger.kernel.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/amd/amdgpu/nbio_v7_7.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/amd/amdgpu/nbio_v7_7.c
++++ b/drivers/gpu/drm/amd/amdgpu/nbio_v7_7.c
+@@ -247,7 +247,7 @@ static void nbio_v7_7_init_registers(str
+       if (def != data)
+               WREG32_SOC15(NBIO, 0, regBIF0_PCIE_MST_CTRL_3, data);
+-      switch (adev->ip_versions[NBIO_HWIP][0]) {
++      switch (amdgpu_ip_version(adev, NBIO_HWIP, 0)) {
+       case IP_VERSION(7, 7, 0):
+               data = RREG32_SOC15(NBIO, 0, regRCC_DEV0_EPF5_STRAP4) & ~BIT(23);
+               WREG32_SOC15(NBIO, 0, regRCC_DEV0_EPF5_STRAP4, data);
diff --git a/queue-6.12/drm-amdgpu-smu14.0.2-fix-ip-version-check.patch b/queue-6.12/drm-amdgpu-smu14.0.2-fix-ip-version-check.patch
new file mode 100644 (file)
index 0000000..fdd8f2c
--- /dev/null
@@ -0,0 +1,31 @@
+From 9e752ee26c1031312a01d2afc281f5f6fdfca176 Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Thu, 12 Dec 2024 17:06:26 -0500
+Subject: drm/amdgpu/smu14.0.2: fix IP version check
+
+From: Alex Deucher <alexander.deucher@amd.com>
+
+commit 9e752ee26c1031312a01d2afc281f5f6fdfca176 upstream.
+
+Use the helper function rather than reading it directly.
+
+Reviewed-by: Yang Wang <kevinyang.wang@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+(cherry picked from commit 8f2cd1067afe68372a1723e05e19b68ed187676a)
+Cc: stable@vger.kernel.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c
++++ b/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c
+@@ -2108,7 +2108,7 @@ static int smu_v14_0_2_enable_gfx_featur
+ {
+       struct amdgpu_device *adev = smu->adev;
+-      if (adev->ip_versions[MP1_HWIP][0] == IP_VERSION(14, 0, 2))
++      if (amdgpu_ip_version(adev, MP1_HWIP, 0) == IP_VERSION(14, 0, 2))
+               return smu_cmn_send_smc_msg_with_param(smu, SMU_MSG_EnableAllSmuFeatures,
+                                                                                  FEATURE_PWR_GFX, NULL);
+       else
index 9475ab21f68c6f201a690983f0e1902c0e62e34e..d5d3af0385fa468b1b88f70f78e9dbdf59402659 100644 (file)
@@ -102,3 +102,7 @@ hwmon-tmp513-fix-interpretation-of-values-of-shunt-v.patch
 hwmon-tmp513-fix-current-register-value-interpretati.patch
 hwmon-tmp513-fix-interpretation-of-values-of-tempera.patch
 block-avoid-to-reuse-hctx-not-removed-from-cpuhp-cal.patch
+trace-ring-buffer-do-not-use-tp_printk-formatting-for-boot-mapped-buffers.patch
+drm-amdgpu-nbio7.11-fix-ip-version-check.patch
+drm-amdgpu-nbio7.7-fix-ip-version-check.patch
+drm-amdgpu-smu14.0.2-fix-ip-version-check.patch
diff --git a/queue-6.12/trace-ring-buffer-do-not-use-tp_printk-formatting-for-boot-mapped-buffers.patch b/queue-6.12/trace-ring-buffer-do-not-use-tp_printk-formatting-for-boot-mapped-buffers.patch
new file mode 100644 (file)
index 0000000..1cdcf4d
--- /dev/null
@@ -0,0 +1,66 @@
+From 8cd63406d08110c8098e1efda8aef7ddab4db348 Mon Sep 17 00:00:00 2001
+From: Steven Rostedt <rostedt@goodmis.org>
+Date: Wed, 18 Dec 2024 14:15:07 -0500
+Subject: trace/ring-buffer: Do not use TP_printk() formatting for boot mapped buffers
+
+From: Steven Rostedt <rostedt@goodmis.org>
+
+commit 8cd63406d08110c8098e1efda8aef7ddab4db348 upstream.
+
+The TP_printk() of a TRACE_EVENT() is a generic printf format that any
+developer can create for their event. It may include pointers to strings
+and such. A boot mapped buffer may contain data from a previous kernel
+where the strings addresses are different.
+
+One solution is to copy the event content and update the pointers by the
+recorded delta, but a simpler solution (for now) is to just use the
+print_fields() function to print these events. The print_fields() function
+just iterates the fields and prints them according to what type they are,
+and ignores the TP_printk() format from the event itself.
+
+To understand the difference, when printing via TP_printk() the output
+looks like this:
+
+  4582.696626: kmem_cache_alloc: call_site=getname_flags+0x47/0x1f0 ptr=00000000e70e10e0 bytes_req=4096 bytes_alloc=4096 gfp_flags=GFP_KERNEL node=-1 accounted=false
+  4582.696629: kmem_cache_alloc: call_site=alloc_empty_file+0x6b/0x110 ptr=0000000095808002 bytes_req=360 bytes_alloc=384 gfp_flags=GFP_KERNEL node=-1 accounted=false
+  4582.696630: kmem_cache_alloc: call_site=security_file_alloc+0x24/0x100 ptr=00000000576339c3 bytes_req=16 bytes_alloc=16 gfp_flags=GFP_KERNEL|__GFP_ZERO node=-1 accounted=false
+  4582.696653: kmem_cache_free: call_site=do_sys_openat2+0xa7/0xd0 ptr=00000000e70e10e0 name=names_cache
+
+But when printing via print_fields() (echo 1 > /sys/kernel/tracing/options/fields)
+the same event output looks like this:
+
+  4582.696626: kmem_cache_alloc: call_site=0xffffffff92d10d97 (-1831793257) ptr=0xffff9e0e8571e000 (-107689771147264) bytes_req=0x1000 (4096) bytes_alloc=0x1000 (4096) gfp_flags=0xcc0 (3264) node=0xffffffff (-1) accounted=(0)
+  4582.696629: kmem_cache_alloc: call_site=0xffffffff92d0250b (-1831852789) ptr=0xffff9e0e8577f800 (-107689770747904) bytes_req=0x168 (360) bytes_alloc=0x180 (384) gfp_flags=0xcc0 (3264) node=0xffffffff (-1) accounted=(0)
+  4582.696630: kmem_cache_alloc: call_site=0xffffffff92efca74 (-1829778828) ptr=0xffff9e0e8d35d3b0 (-107689640864848) bytes_req=0x10 (16) bytes_alloc=0x10 (16) gfp_flags=0xdc0 (3520) node=0xffffffff (-1) accounted=(0)
+  4582.696653: kmem_cache_free: call_site=0xffffffff92cfbea7 (-1831879001) ptr=0xffff9e0e8571e000 (-107689771147264) name=names_cache
+
+Cc: stable@vger.kernel.org
+Cc: Masami Hiramatsu <mhiramat@kernel.org>
+Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+Cc: Linus Torvalds <torvalds@linux-foundation.org>
+Link: https://lore.kernel.org/20241218141507.28389a1d@gandalf.local.home
+Fixes: 07714b4bb3f98 ("tracing: Handle old buffer mappings for event strings and functions")
+Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ kernel/trace/trace.c |    9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+--- a/kernel/trace/trace.c
++++ b/kernel/trace/trace.c
+@@ -4377,6 +4377,15 @@ static enum print_line_t print_trace_fmt
+       if (event) {
+               if (tr->trace_flags & TRACE_ITER_FIELDS)
+                       return print_event_fields(iter, event);
++              /*
++               * For TRACE_EVENT() events, the print_fmt is not
++               * safe to use if the array has delta offsets
++               * Force printing via the fields.
++               */
++              if ((tr->text_delta || tr->data_delta) &&
++                  event->type > __TRACE_LAST_TYPE)
++                      return print_event_fields(iter, event);
++
+               return event->funcs->trace(iter, sym_flags, event);
+       }