From: "gaoliming" <gaoliming@byosoft.com.cn>
To: "'Konstantin Aladyshev'" <aladyshev22@gmail.com>, <devel@edk2.groups.io>
Cc: <bob.c.feng@intel.com>, <yuwei.chen@intel.com>
Subject: 回复: [PATCH 2/6] BaseTools/VolInfo: Correct buffer for GenCrc32 tool
Date: Tue, 27 Sep 2022 10:50:48 +0800 [thread overview]
Message-ID: <018201d8d21b$f2d895e0$d889c1a0$@byosoft.com.cn> (raw)
In-Reply-To: <20220830101445.18110-2-aladyshev22@gmail.com>
Konstantin:
I agree this change. CRC32 guid section doesn't set
EFI_GUIDED_SECTION_PROCESSING_REQUIRED.
It places CRC32 checksum in its guided header. When its data is verified,
its checksum and data will be required together.
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Thanks
Liming
> -----邮件原件-----
> 发件人: Konstantin Aladyshev <aladyshev22@gmail.com>
> 发送时间: 2022年8月30日 18:15
> 收件人: devel@edk2.groups.io
> 抄送: bob.c.feng@intel.com; gaoliming@byosoft.com.cn;
> yuwei.chen@intel.com; Konstantin Aladyshev <aladyshev22@gmail.com>
> 主题: [PATCH 2/6] BaseTools/VolInfo: Correct buffer for GenCrc32 tool
>
> If the guided section was encoded with GenCrc32 tool the resulting
> 'EFI_GUID_DEFINED_SECTION.DataOffset' field points to the start of
> the meaningfull data that follows the CRC32 value.
> But if we want to decode the section with GenCrc32 tool we need to
> provide a buffer that includes the CRC32 value itself.
>
> Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
> ---
> BaseTools/Source/C/VolInfo/VolInfo.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/BaseTools/Source/C/VolInfo/VolInfo.c
> b/BaseTools/Source/C/VolInfo/VolInfo.c
> index b5760d185e..4628e756d7 100644
> --- a/BaseTools/Source/C/VolInfo/VolInfo.c
> +++ b/BaseTools/Source/C/VolInfo/VolInfo.c
> @@ -2009,6 +2009,13 @@ Returns:
> );
>
> free (ExtractionTool);
>
>
>
> + if (!CompareGuid (
>
> + EfiGuid,
>
> + &gEfiCrc32GuidedSectionExtractionProtocolGuid
>
> + )
>
> + ) {
>
> + DataOffset -= 4;
>
> + }
>
> Status =
>
> PutFileImage (
>
> ToolInputFile,
>
> --
> 2.25.1
next prev parent reply other threads:[~2022-09-27 2:50 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-30 10:14 [PATCH 1/6] BaseTools/VolInfo: Fix EFI_SECTION_GUID_DEFINED parsing Konstantin Aladyshev
2022-08-30 10:14 ` [PATCH 2/6] BaseTools/VolInfo: Correct buffer for GenCrc32 tool Konstantin Aladyshev
2022-09-27 2:50 ` gaoliming [this message]
2022-08-30 10:14 ` [PATCH 3/6] BaseTools/VolInfo: Increase GUID base name string Konstantin Aladyshev
2022-09-26 5:25 ` 回复: [edk2-devel] " gaoliming
2022-08-30 10:14 ` [PATCH 4/6] BaseTools/VolInfo: Update file and section type strings Konstantin Aladyshev
2022-09-26 5:26 ` 回复: [edk2-devel] " gaoliming
2022-08-30 10:14 ` [PATCH 5/6] BaseTools/VolInfo: Parse apriori files Konstantin Aladyshev
2022-09-26 5:27 ` 回复: [edk2-devel] " gaoliming
2022-08-30 10:14 ` [PATCH 6/6] BaseTools/VolInfo: Update copyright information Konstantin Aladyshev
2022-09-26 5:27 ` 回复: [edk2-devel] " gaoliming
2022-08-31 1:43 ` 回复: [edk2-devel] [PATCH 1/6] BaseTools/VolInfo: Fix EFI_SECTION_GUID_DEFINED parsing gaoliming
2022-10-01 15:15 ` Bob Feng
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-list 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='018201d8d21b$f2d895e0$d889c1a0$@byosoft.com.cn' \
--to=devel@edk2.groups.io \
/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