Skip to contentSkip to conversation

DROP: Re: [PATCH] drm/amd/amdgpu: Add checksun check for pf2vf message

PATCH Li, Xin (Justin) 1 participant 1 message Oct 23, 2020 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

[AMD Official Use Only - Internal Distribution Only]

Please drop this patch, there’s some typo in the commit message

Best Regards,
Li, Xin (Justin)

From: Li, Xin (Justin) <[email protected]>
Date: Friday, October 23, 2020 at 10:17
To: [email protected] <[email protected]>
Cc: Li, Xin (Justin) <[email protected]>, Zhou, Tiecheng <[email protected]>, Li, Xin (Justin) <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, Tiecheng <[email protected]>
Subject: [PATCH] drm/amd/amdgpu: Add checksun check for pf2vf message
Add checksum checking for pf2vf message

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c +2 -3
index 836d784456e5..bfc74533b5ee 100644
@@ -450,12 +450,11 @@ static int amdgpu_virt_read_pf2vf_data(struct amdgpu_device *adev)
                         ((struct amdgim_pf2vf_info_v1 *)pf2vf_info)->feature_flags;
                 break;
         case 2:
-               /* TODO: missing key, need to add it later */
                 checksum = ((struct amd_sriov_msg_pf2vf_info *)pf2vf_info)->checksum;
                 checkval = amd_sriov_msg_checksum(
                         adev->virt.fw_reserve.p_pf2vf, pf2vf_info->size,
-                       0, checksum);
-               if (checksum != checkval) {
+                       adev->virt.fw_reserve.checksum_key, checksum);
+               if (checksum != 0 && checksum != checkval) {
                         DRM_ERROR("invalid pf2vf message\n");
                         return -EINVAL;
                 }

--
2.24.3 (Apple Git-128)

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx