From: "Ni, Ruiyu" <ruiyu.ni@intel.com>
To: Laszlo Ersek <lersek@redhat.com>,
edk2-devel-01 <edk2-devel@lists.01.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>,
"Dong, Eric" <eric.dong@intel.com>,
Paulo Alcantara <pcacjr@zytor.com>,
"Zeng, Star" <star.zeng@intel.com>
Subject: Re: [PATCH 1/2] MdeModulePkg/UdfDxe: reject reserved values in ICB.Flags[2:0]
Date: Wed, 13 Sep 2017 02:26:11 +0000 [thread overview]
Message-ID: <734D49CCEBEEF84792F5B80ED585239D5BA2CDF2@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <20170912222612.14451-2-lersek@redhat.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Thanks/Ray
> -----Original Message-----
> From: Laszlo Ersek [mailto:lersek@redhat.com]
> Sent: Wednesday, September 13, 2017 6:26 AM
> To: edk2-devel-01 <edk2-devel@lists.01.org>
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>; Dong, Eric
> <eric.dong@intel.com>; Paulo Alcantara <pcacjr@zytor.com>; Ni, Ruiyu
> <ruiyu.ni@intel.com>; Zeng, Star <star.zeng@intel.com>
> Subject: [PATCH 1/2] MdeModulePkg/UdfDxe: reject reserved values in
> ICB.Flags[2:0]
>
> The ECMA-167 standard (3rd Edition, June 1997) reserves values 4 through 7
> in the ICB.Flags[2:0] bit-field for future standardization; see "14.6 ICB Tag" /
> "14.6.8 Flags (RBP 18)".
>
> https://www.ecma-international.org/publications/standards/Ecma-167.htm
>
> The
>
> switch (RecordingFlags)
>
> statement in the ReadFile() function handles all the standard values, using
> the constants of the UDF_FE_RECORDING_FLAGS enum type. However, the
> reserved values are not caught with a "default" case label, which both breaks
> the edk2 Coding Style Spec, and leaves the Status variable un-initialized,
> before we return Status under the Done label.
>
> Set Status to EFI_UNSUPPORTED if we encounter a reserved value.
>
> This issue was reported by Ard's and Gerd's CI systems independently
> (through build failures with GCC48/GCC49, DEBUG/RELEASE targets).
>
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Cc: Eric Dong <eric.dong@intel.com>
> Cc: Paulo Alcantara <pcacjr@zytor.com>
> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
> Cc: Star Zeng <star.zeng@intel.com>
> Reported-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Reported-by: Gerd Hoffmann <kraxel@redhat.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
> ---
> MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c | 8
> ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c
> b/MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c
> index 72862653738e..096fbb4452cb 100644
> --- a/MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c
> +++ b/MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c
> @@ -1150,6 +1150,14 @@ ReadFile (
> ASSERT (FALSE);
> Status = EFI_UNSUPPORTED;
> break;
> +
> + default:
> + //
> + // A flag value reserved by the ECMA-167 standard (3rd Edition - June
> + // 1997); 14.6 ICB Tag; 14.6.8 Flags (RBP 18); was found.
> + //
> + Status = EFI_UNSUPPORTED;
> + break;
> }
>
> Done:
> --
> 2.14.1.3.gb7cf6e02401b
>
next prev parent reply other threads:[~2017-09-13 2:23 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-12 22:26 [PATCH 0/2] MdeModulePkg: UDF fixes and cleanups, round 2 Laszlo Ersek
2017-09-12 22:26 ` [PATCH 1/2] MdeModulePkg/UdfDxe: reject reserved values in ICB.Flags[2:0] Laszlo Ersek
2017-09-13 2:26 ` Ni, Ruiyu [this message]
2017-09-13 6:35 ` Zeng, Star
2017-09-12 22:26 ` [PATCH 2/2] MdeModulePkg/UdfDxe: suppress incorrect compiler warning in ReadFile() Laszlo Ersek
2017-09-13 6:33 ` Zeng, Star
2017-09-13 6:43 ` Zeng, Star
2017-09-13 18:49 ` Laszlo Ersek
2017-09-13 18:52 ` Ard Biesheuvel
2017-09-14 0:42 ` Zeng, Star
2017-09-14 1:20 ` Zeng, Star
2017-09-14 1:30 ` Gao, Liming
2017-09-14 8:19 ` Laszlo Ersek
2017-09-14 8:53 ` Zeng, Star
2017-09-14 8:17 ` Laszlo Ersek
2017-09-14 8:50 ` Zeng, Star
2017-09-14 9:01 ` Laszlo Ersek
2017-09-13 13:42 ` [PATCH 0/2] MdeModulePkg: UDF fixes and cleanups, round 2 Paulo Alcantara
2017-09-13 22:08 ` Laszlo Ersek
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=734D49CCEBEEF84792F5B80ED585239D5BA2CDF2@SHSMSX104.ccr.corp.intel.com \
--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