lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250731-b4-dont-wake-next-v1-6-e51bdc347fa3@gmail.com>
Date: Thu, 31 Jul 2025 07:36:39 +0200
From: Philipp Zabel <philipp.zabel@...il.com>
To: Alex Deucher <alexander.deucher@....com>, 
 Christian König <christian.koenig@....com>, 
 David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>
Cc: amd-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org, 
 linux-kernel@...r.kernel.org, Philipp Zabel <p.zabel@...gutronix.de>, 
 Philipp Zabel <philipp.zabel@...il.com>
Subject: [PATCH RFC 6/6] drm/amdgpu: don't wake up the GPU for syncobj
 feature detection

Don't wake the GPU if the SYNCOBJ_CREATE/DESTROY/WAIT ioctls are used
to detect syncobj features before the GPU is powered up.

Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/2295
Signed-off-by: Philipp Zabel <philipp.zabel@...il.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
index 79d31ac6a7b37..b12342e917193 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
@@ -2981,6 +2981,14 @@ long amdgpu_drm_ioctl(struct file *filp,
 		}
 	}
 
+	if (wake && unlikely(!fpriv->initialized)) {
+		/* Allow syncobj feature detection before GPU wakeup */
+		if (cmd == DRM_IOCTL_SYNCOBJ_CREATE ||
+		    cmd == DRM_IOCTL_SYNCOBJ_DESTROY ||
+		    cmd == DRM_IOCTL_SYNCOBJ_WAIT)
+			wake = false;
+	}
+
 	dev = file_priv->minor->dev;
 	if (wake) {
 		ret = pm_runtime_get_sync(dev->dev);

-- 
2.50.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ