drm/amdgpu: fix gpu page fault after hibernation on PF passthrough
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
drm/amdgpu: fix gpu page fault after hibernation on PF passthrough
On PF passthrough environment, after hibernate and then resume, coralgemm will cause gpu page fault.
Mode1 reset happens during hibernate, but partition mode is not restored on resume, register mmCP_HYP_XCP_CTL and mmCP_PSP_XCP_CTL is not right after resume. When CP access the MQD BO, wrong stride size is used, this will cause out of bound access on the MQD BO, resulting page fault.
The fix is to ensure gfx_v9_4_3_switch_compute_partition() is called when resume from a hibernation. KFD resume is called separately during a reset recovery or resume from suspend sequence. Hence it's not required to be called as part of partition switch.
(cherry picked from commit 5d1b32cfe4a676fe552416cb5ae847b215463a1a)
From the CVE record · Linux
In Linux kernel amdgpu PF passthrough environments, hibernation and resume can leave the compute partition mode incorrectly restored. Running coralgemm afterward can cause an out-of-bounds access to the MQD BO and a GPU page fault; the input does not specify an attacker or authentication requirements.
Engineers running Linux kernels with amdgpu PF passthrough should check their systems; affected versions are not specified.