]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
drm/amd/amdgpu:save psp ring wptr to avoid attack
authorVictor Zhao <Victor.Zhao@amd.com>
Thu, 18 Mar 2021 05:44:35 +0000 (13:44 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 2 Jun 2021 21:56:03 +0000 (17:56 -0400)
commit2370eba9f552eaae3d8aa1f70b8e9eec5c560f9e
tree1946cf7009303d919dc349b88a3800265b1db612
parentc5699e2d863f58221044efdc3fa712dd32d55cde
drm/amd/amdgpu:save psp ring wptr to avoid attack

[Why]
When some tools performing psp mailbox attack, the readback value
of register can be a random value which may break psp.

[How]
Use a psp wptr cache machanism to aovid the change made by attack.

v2: unify change and add detailed reason

Signed-off-by: Victor Zhao <Victor.Zhao@amd.com>
Signed-off-by: Jingwen Chen <Jingwen.Chen2@amd.com>
Reviewed-by: Monk Liu <monk.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h
drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
drivers/gpu/drm/amd/amdgpu/psp_v3_1.c