]> git.baikalelectronics.ru Git - 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)
commit5e1f2663aa975ea5e5bc7723b9915cc0eba24e05
tree1946cf7009303d919dc349b88a3800265b1db612
parentc84da07f07b729cfd8a3e564bd0d21bceb86ccc2
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