* DROP: Re: [PATCH] drm/amd/amdgpu: Add checksun check for pf2vf message
[not found] <20201023021724.20433-1-Xin2.Li@amd.com>
@ 2020-10-23 2:18 ` Li, Xin (Justin)
0 siblings, 0 replies; only message in thread
From: Li, Xin (Justin) @ 2020-10-23 2:18 UTC (permalink / raw)
To: amd-gfx; +Cc: Zhou, Tiecheng, Tiecheng, Li, Zhou
[-- Attachment #1.1: Type: text/plain, Size: 1995 bytes --]
[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) <Xin2.Li@amd.com>
Date: Friday, October 23, 2020 at 10:17
To: amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>
Cc: Li, Xin (Justin) <Xin2.Li@amd.com>, Zhou, Tiecheng <Tiecheng.Zhou@amd.com>, Li, Xin (Justin) <Xin2.Li@amd.com>, Li@justins-mbp.amd.com <Li@justins-mbp.amd.com>, Zhou@justins-mbp.amd.com <Zhou@justins-mbp.amd.com>, Tiecheng <Thecheng.Zhou@amd.com>
Subject: [PATCH] drm/amd/amdgpu: Add checksun check for pf2vf message
Add checksum checking for pf2vf message
Signed-off-by: Li, Xin (Justin) <Xin2.Li@amd.com>
Signed-off-by: Zhou, Tiecheng <Thecheng.Zhou@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
index 836d784456e5..bfc74533b5ee 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
@@ -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)
[-- Attachment #1.2: Type: text/html, Size: 5486 bytes --]
[-- Attachment #2: Type: text/plain, Size: 154 bytes --]
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-10-23 2:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20201023021724.20433-1-Xin2.Li@amd.com>
2020-10-23 2:18 ` DROP: Re: [PATCH] drm/amd/amdgpu: Add checksun check for pf2vf message Li, Xin (Justin)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).