mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: Don't use UTS_RELEASE directly
@ 2026-04-28 14:47 Uwe Kleine-König (The Capable Hub)
  2026-06-09 15:32 ` Uwe Kleine-König (The Capable Hub)
  0 siblings, 1 reply; 3+ messages in thread
From: Uwe Kleine-König (The Capable Hub) @ 2026-04-28 14:47 UTC (permalink / raw)
  To: Alex Deucher, Christian König
  Cc: David Airlie, Simona Vetter, Pierre-Eric Pelloux-Prayer,
	Jesse Zhang, Lijo Lazar, Vitaly Prosyak, Kees Cook,
	André Almeida, Mario Limonciello (AMD),
	amd-gfx, dri-devel, linux-kernel

UTS_RELEASE evaluates to a static string and changes quite easily (e.g.
uncommitted changes in the source tree or new commits). So when checking
if a patch introduces changes to the resulting binary each usage of
UTS_RELEASE is source of annoyance.

Instead of using UTS_RELEASE directly use init_utsname()->release which
evaluates to the same string but with that a change of UTS_RELEASE
doesn't affect amdgpu_dev_coredump.o.

Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c
index d386bc775d03..20ae2bd4617a 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c
@@ -22,8 +22,8 @@
  *
  */
 
-#include <generated/utsrelease.h>
 #include <linux/devcoredump.h>
+#include <linux/utsname.h>
 #include "amdgpu_dev_coredump.h"
 #include "atom.h"
 
@@ -236,7 +236,7 @@ amdgpu_devcoredump_format(char *buffer, size_t count, struct amdgpu_coredump_inf
 
 	drm_printf(&p, "**** AMDGPU Device Coredump ****\n");
 	drm_printf(&p, "version: " AMDGPU_COREDUMP_VERSION "\n");
-	drm_printf(&p, "kernel: " UTS_RELEASE "\n");
+	drm_printf(&p, "kernel: %s\n", init_utsname()->release);
 	drm_printf(&p, "module: " KBUILD_MODNAME "\n");
 	drm_printf(&p, "time: %ptSp\n", &coredump->reset_time);
 

base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731
-- 
2.47.3


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/amdgpu: Don't use UTS_RELEASE directly
  2026-04-28 14:47 [PATCH] drm/amdgpu: Don't use UTS_RELEASE directly Uwe Kleine-König (The Capable Hub)
@ 2026-06-09 15:32 ` Uwe Kleine-König (The Capable Hub)
  2026-06-09 16:03   ` Mario Limonciello
  0 siblings, 1 reply; 3+ messages in thread
From: Uwe Kleine-König (The Capable Hub) @ 2026-06-09 15:32 UTC (permalink / raw)
  To: Alex Deucher, Christian König
  Cc: David Airlie, Simona Vetter, Pierre-Eric Pelloux-Prayer,
	Jesse Zhang, Lijo Lazar, Vitaly Prosyak, Kees Cook,
	André Almeida, Mario Limonciello (AMD),
	amd-gfx, dri-devel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 698 bytes --]

Hello,

On Tue, Apr 28, 2026 at 04:47:03PM +0200, Uwe Kleine-König (The Capable Hub) wrote:
> UTS_RELEASE evaluates to a static string and changes quite easily (e.g.
> uncommitted changes in the source tree or new commits). So when checking
> if a patch introduces changes to the resulting binary each usage of
> UTS_RELEASE is source of annoyance.
> 
> Instead of using UTS_RELEASE directly use init_utsname()->release which
> evaluates to the same string but with that a change of UTS_RELEASE
> doesn't affect amdgpu_dev_coredump.o.
> 
> Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>

Is this patch still on someone's radar?

Best regards
Uwe

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/amdgpu: Don't use UTS_RELEASE directly
  2026-06-09 15:32 ` Uwe Kleine-König (The Capable Hub)
@ 2026-06-09 16:03   ` Mario Limonciello
  0 siblings, 0 replies; 3+ messages in thread
From: Mario Limonciello @ 2026-06-09 16:03 UTC (permalink / raw)
  To: Uwe Kleine-König (The Capable Hub),
	Alex Deucher, Christian König
  Cc: David Airlie, Simona Vetter, Pierre-Eric Pelloux-Prayer,
	Jesse Zhang, Lijo Lazar, Vitaly Prosyak, Kees Cook,
	André Almeida, amd-gfx, dri-devel, linux-kernel

On 6/9/26 10:32, Uwe Kleine-König (The Capable Hub) wrote:
> Hello,
> 
> On Tue, Apr 28, 2026 at 04:47:03PM +0200, Uwe Kleine-König (The Capable Hub) wrote:
>> UTS_RELEASE evaluates to a static string and changes quite easily (e.g.
>> uncommitted changes in the source tree or new commits). So when checking
>> if a patch introduces changes to the resulting binary each usage of
>> UTS_RELEASE is source of annoyance.
>>
>> Instead of using UTS_RELEASE directly use init_utsname()->release which
>> evaluates to the same string but with that a change of UTS_RELEASE
>> doesn't affect amdgpu_dev_coredump.o.
>>
>> Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
> 
> Is this patch still on someone's radar?
> 
> Best regards
> Uwe

Sorry it looks like it got missed.  Thanks for pinging.
I'll pick it up.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-06-09 16:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-04-28 14:47 [PATCH] drm/amdgpu: Don't use UTS_RELEASE directly Uwe Kleine-König (The Capable Hub)
2026-06-09 15:32 ` Uwe Kleine-König (The Capable Hub)
2026-06-09 16:03   ` Mario Limonciello

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®