From: "Li, Xin (Justin)" <Xin2.Li@amd.com>
To: "amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>
Cc: "Zhou, Tiecheng" <Tiecheng.Zhou@amd.com>,
Tiecheng <Thecheng.Zhou@amd.com>,
"Li@justins-mbp.amd.com" <Li@justins-mbp.amd.com>,
"Zhou@justins-mbp.amd.com" <Zhou@justins-mbp.amd.com>
Subject: DROP: Re: [PATCH] drm/amd/amdgpu: Add checksun check for pf2vf message
Date: Fri, 23 Oct 2020 02:18:55 +0000 [thread overview]
Message-ID: <BYAPR12MB475942AB4A785C3F2EEEA016BB1A0@BYAPR12MB4759.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20201023021724.20433-1-Xin2.Li@amd.com>
[-- 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
parent reply other threads:[~2020-10-23 2:19 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20201023021724.20433-1-Xin2.Li@amd.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BYAPR12MB475942AB4A785C3F2EEEA016BB1A0@BYAPR12MB4759.namprd12.prod.outlook.com \
--to=xin2.li@amd.com \
--cc=Li@justins-mbp.amd.com \
--cc=Thecheng.Zhou@amd.com \
--cc=Tiecheng.Zhou@amd.com \
--cc=Zhou@justins-mbp.amd.com \
--cc=amd-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).