drm/amdgpu: skip RAS error count reset in debug mode
Subsystems (2)
PATCH 1/1 drm/amdgpu: skip RAS error count reset in debug mode
After legacy ACA support was retired, some ASICs systems may trigger security violations during driver load when amdgpu_ras_reset_error_count() is invoked in debug mode.
The function only checks whether RAS is supported for the target block before proceeding. In debug mode, ACA/RAS handling is not available and attempting to access the reset path can lead to unexpected HW accesses, resulting in security violation reports during driver initialization.
Prevent this by treating debug mode as unsupported for RAS error count reset and return -EOPNOTSUPP early.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +2 -1
@@ -1506,7 +1506,8 @@ int amdgpu_ras_reset_error_count(struct amdgpu_device *adev,return -EOPNOTSUPP ; } -if (!amdgpu_ras_is_supported (adev, block)) +if (!amdgpu_ras_is_supported (adev, block) || + !amdgpu_ras_mgr_get_debug_mode (adev))return -EOPNOTSUPP ;if (amdgpu_sriov_vf (adev))
Signature · 1 line
2.34.1
AMD General
Hi @Sun, Ce(Overlord)<mailto:[email protected]>,
Have we identified the specific reset operation that is triggering the security violation?
Would it make more sense to skip the reset, or remove the direct reset call for the IPs where the security violation occurs?
In general, a reset is still required on some GFX v9_4_3 products to prevent stale or invalid error-counter data from being reported at initialization time.
Regards,
Hawking
-----Original Message-----
From: Sun, Ce(Overlord) <[email protected]>
Sent: Wednesday, October 21, 2026 5:16 PM
To: [email protected]
Cc: Zhang, Hawking <[email protected]>; Chai, Thomas <[email protected]>; Zhou1, Tao <[email protected]>; Yang, Stanley <[email protected]>; Gadre, Mangesh <[email protected]>; Sun, Ce(Overlord) <[email protected]>
Subject: [PATCH] drm/amdgpu: skip RAS error count reset in debug mode
After legacy ACA support was retired, some ASICs systems may trigger security violations during driver load when amdgpu_ras_reset_error_count() is invoked in debug mode.
The function only checks whether RAS is supported for the target block before proceeding. In debug mode, ACA/RAS handling is not available and attempting to access the reset path can lead to unexpected HW accesses, resulting in security violation reports during driver initialization.
Prevent this by treating debug mode as unsupported for RAS error count reset and return -EOPNOTSUPP early.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +2 -1
@@ -1506,7 +1506,8 @@ int amdgpu_ras_reset_error_count(struct amdgpu_device *adev,return -EOPNOTSUPP ; } -if (!amdgpu_ras_is_supported (adev, block)) +if (!amdgpu_ras_is_supported (adev, block) || + !amdgpu_ras_mgr_get_debug_mode (adev))return -EOPNOTSUPP ;if (amdgpu_sriov_vf (adev))
--
2.34.1
AMD General
Hi Hawking,
Thanks for the review. The current changes are based on the legacy RAS implementation approach.
I'll further investigate the specific reset operation that is triggering the security violation. In the meantime, I'll also try modifying the flow by either skipping the reset for the affected IPs or removing the direct reset call altogether where the security violation occurs.
Regards,
Ce
________________________________
From: Zhang, Hawking <[email protected]>
Sent: Thursday, October 22, 2026 9:49 AM
To: Sun, Ce(Overlord) <[email protected]>; [email protected] <[email protected]>
Cc: Chai, Thomas <[email protected]>; Zhou1, Tao <[email protected]>; Yang, Stanley <[email protected]>; Gadre, Mangesh <[email protected]>
Subject: RE: [PATCH] drm/amdgpu: skip RAS error count reset in debug mode
AMD General
Hi @Sun, Ce(Overlord)<mailto:[email protected]>,
Have we identified the specific reset operation that is triggering the security violation?
Would it make more sense to skip the reset, or remove the direct reset call for the IPs where the security violation occurs?
In general, a reset is still required on some GFX v9_4_3 products to prevent stale or invalid error-counter data from being reported at initialization time.
Regards,
Hawking
-----Original Message-----
From: Sun, Ce(Overlord) <[email protected]>
Sent: Wednesday, October 21, 2026 5:16 PM
To: [email protected]
Cc: Zhang, Hawking <[email protected]>; Chai, Thomas <[email protected]>; Zhou1, Tao <[email protected]>; Yang, Stanley <[email protected]>; Gadre, Mangesh <[email protected]>; Sun, Ce(Overlord) <[email protected]>
Subject: [PATCH] drm/amdgpu: skip RAS error count reset in debug mode
After legacy ACA support was retired, some ASICs systems may trigger security violations during driver load when amdgpu_ras_reset_error_count() is invoked in debug mode.
The function only checks whether RAS is supported for the target block before proceeding. In debug mode, ACA/RAS handling is not available and attempting to access the reset path can lead to unexpected HW accesses, resulting in security violation reports during driver initialization.
Prevent this by treating debug mode as unsupported for RAS error count reset and return -EOPNOTSUPP early.
---drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +2 -1
@@ -1506,7 +1506,8 @@ int amdgpu_ras_reset_error_count(struct amdgpu_device *adev,return -EOPNOTSUPP ; } -if (!amdgpu_ras_is_supported (adev, block)) +if (!amdgpu_ras_is_supported (adev, block) || + !amdgpu_ras_mgr_get_debug_mode (adev))return -EOPNOTSUPP ;if (amdgpu_sriov_vf (adev))
--
2.34.1
Zhang, Hawking
Reviewed-byAMD General
The patch is
Regards,
Hawking
From: Sun, Ce(Overlord) <[email protected]>
Sent: Thursday, October 22, 2026 10:36 AM
To: Zhang, Hawking <[email protected]>; [email protected]
Cc: Chai, Thomas <[email protected]>; Zhou1, Tao <[email protected]>; Yang, Stanley <[email protected]>; Gadre, Mangesh <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: skip RAS error count reset in debug mode
AMD General
Hi Hawking,
Thanks for the review. The current changes are based on the legacy RAS implementation approach.
I'll further investigate the specific reset operation that is triggering the security violation. In the meantime, I'll also try modifying the flow by either skipping the reset for the affected IPs or removing the direct reset call altogether where the security violation occurs.
Regards,
Ce
________________________________
From: Zhang, Hawking <[email protected]<mailto:[email protected]>>
Sent: Thursday, October 22, 2026 9:49 AM
To: Sun, Ce(Overlord) <[email protected]<mailto:[email protected]>>; [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>>
Cc: Chai, Thomas <[email protected]<mailto:[email protected]>>; Zhou1, Tao <[email protected]<mailto:[email protected]>>; Yang, Stanley <[email protected]<mailto:[email protected]>>; Gadre, Mangesh <[email protected]<mailto:[email protected]>>
Subject: RE: [PATCH] drm/amdgpu: skip RAS error count reset in debug mode
AMD General
Hi @Sun, Ce(Overlord)<mailto:[email protected]>,
Have we identified the specific reset operation that is triggering the security violation?
Would it make more sense to skip the reset, or remove the direct reset call for the IPs where the security violation occurs?
In general, a reset is still required on some GFX v9_4_3 products to prevent stale or invalid error-counter data from being reported at initialization time.
Regards,
Hawking
-----Original Message-----
From: Sun, Ce(Overlord) <[email protected]<mailto:[email protected]>>
Sent: Wednesday, October 21, 2026 5:16 PM
To: [email protected]<mailto:[email protected]>
Cc: Zhang, Hawking <[email protected]<mailto:[email protected]>>; Chai, Thomas <[email protected]<mailto:[email protected]>>; Zhou1, Tao <[email protected]<mailto:[email protected]>>; Yang, Stanley <[email protected]<mailto:[email protected]>>; Gadre, Mangesh <[email protected]<mailto:[email protected]>>; Sun, Ce(Overlord) <[email protected]<mailto:[email protected]>>
Subject: [PATCH] drm/amdgpu: skip RAS error count reset in debug mode
After legacy ACA support was retired, some ASICs systems may trigger security violations during driver load when amdgpu_ras_reset_error_count() is invoked in debug mode.
The function only checks whether RAS is supported for the target block before proceeding. In debug mode, ACA/RAS handling is not available and attempting to access the reset path can lead to unexpected HW accesses, resulting in security violation reports during driver initialization.
Prevent this by treating debug mode as unsupported for RAS error count reset and return -EOPNOTSUPP early.
---drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +2 -1
@@ -1506,7 +1506,8 @@ int amdgpu_ras_reset_error_count(struct amdgpu_device *adev,return -EOPNOTSUPP ; } -if (!amdgpu_ras_is_supported (adev, block)) +if (!amdgpu_ras_is_supported (adev, block) || + !amdgpu_ras_mgr_get_debug_mode (adev))return -EOPNOTSUPP ;if (amdgpu_sriov_vf (adev))
--
2.34.1