public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ni, Ruiyu" <ruiyu.ni@intel.com>
To: Laszlo Ersek <lersek@redhat.com>, Paulo Alcantara <pcacjr@zytor.com>
Cc: "Dong, Eric" <eric.dong@intel.com>,
	"Wu, Hao A" <hao.a.wu@intel.com>,
	"Justen, Jordan L" <jordan.l.justen@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
	Andrew Fish <afish@apple.com>,
	"Gao, Liming" <liming.gao@intel.com>,
	"Kinney, Michael D" <michael.d.kinney@intel.com>,
	"Zeng, Star" <star.zeng@intel.com>
Subject: Re: [PATCH v6 0/6] read-only UDF file system support
Date: Fri, 8 Sep 2017 15:05:28 +0000	[thread overview]
Message-ID: <734D49CCEBEEF84792F5B80ED585239D5BA28A47@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <dd01c5cf-38c9-c221-e793-d5985c09f586@redhat.com>

Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Laszlo Ersek
Sent: Friday, September 8, 2017 9:26 PM
To: Paulo Alcantara <pcacjr@zytor.com>; Ni, Ruiyu <ruiyu.ni@intel.com>
Cc: Dong, Eric <eric.dong@intel.com>; Wu, Hao A <hao.a.wu@intel.com>; Justen, Jordan L <jordan.l.justen@intel.com>; edk2-devel@lists.01.org; Andrew Fish <afish@apple.com>; Gao, Liming <liming.gao@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>; Zeng, Star <star.zeng@intel.com>
Subject: Re: [edk2] [PATCH v6 0/6] read-only UDF file system support

Ray,

On 09/08/17 14:41, Paulo Alcantara wrote:

> v6:
>  - Fixed a bug in UdfRead() that'd pontentially break in ARM or IA32
>    by allowing caller to read more than 4GiB of data
>    (i.e. BufferSize pointer is dereferenced as an UINT64 * and it's
>     followed by 4 bytes that are nonzero).
>
> Repo:   https://github.com/pcacjr/edk2.git
> Branch: udf-fs-v6

The v5-v6 diff is as follows:

> diff --git a/MdeModulePkg/Universal/Disk/UdfDxe/File.c 
> b/MdeModulePkg/Universal/Disk/UdfDxe/File.c
> index 2dbcff0be4a3..8b9339567f8e 100644
> --- a/MdeModulePkg/Universal/Disk/UdfDxe/File.c
> +++ b/MdeModulePkg/Universal/Disk/UdfDxe/File.c
> @@ -325,8 +325,9 @@ UdfRead (
>    UDF_FILE_IDENTIFIER_DESCRIPTOR  *NewFileIdentifierDesc;
>    VOID                            *NewFileEntryData;
>    CHAR16                          FileName[UDF_FILENAME_LENGTH] = { 0 };
>    UINT64                          FileSize;
> +  UINT64                          BufferSizeUint64;
>
>    OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
>
>    if (This == NULL || BufferSize == NULL || (*BufferSize != 0 && @@ 
> -363,18 +364,22 @@ UdfRead (
>        Status = EFI_SUCCESS;
>        goto Done;
>      }
>
> +    BufferSizeUint64 = *BufferSize;
> +
>      Status = ReadFileData (
>        BlockIo,
>        DiskIo,
>        Volume,
>        Parent,
>        PrivFileData->FileSize,
>        &PrivFileData->FilePosition,
>        Buffer,
> -      (UINT64 *)(UINTN)BufferSize
> +      &BufferSizeUint64
>        );
> +    ASSERT (BufferSizeUint64 <= MAX_UINTN);
> +    *BufferSize = (UINTN)BufferSizeUint64;
>    } else if (IS_FID_DIRECTORY_FILE (Parent->FileIdentifierDesc)) {
>      if (ReadDirInfo->FidOffset == 0 && PrivFileData->FilePosition > 0) {
>        Status = EFI_DEVICE_ERROR;
>        *BufferSize = 0;

It looks OK to me, and it builds fine for IA32, X64, ARM and AARCH64:

  Build/ArmVirtQemu-AARCH64/DEBUG_GCC5/AARCH64/UdfDxe.efi
  Build/ArmVirtQemu-ARM/DEBUG_GCC5/ARM/UdfDxe.efi
  Build/OvmfIa32/NOOPT_GCC48/IA32/UdfDxe.efi
  Build/OvmfX64/NOOPT_GCC48/X64/UdfDxe.efi

Green light from your side?

Paulo: you forgot to pick up Ray's R-b for patches #4 and #5, from his
v5 response
<http://mid.mail-archive.com/734D49CCEBEEF84792F5B80ED585239D5BA282B7@SHSMSX104.ccr.corp.intel.com>
-- it was for the entire series.

But, I'll apply that for you.

Thanks,
Laszlo
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


  parent reply	other threads:[~2017-09-08 15:02 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-08 12:41 [PATCH v6 0/6] read-only UDF file system support Paulo Alcantara
2017-09-08 12:41 ` [PATCH v6 1/6] MdePkg: Add UDF volume structure definitions Paulo Alcantara
2017-09-08 12:41 ` [PATCH v6 2/6] MdeModulePkg/PartitionDxe: Add UDF file system support Paulo Alcantara
2017-09-08 12:41 ` [PATCH v6 3/6] MdeModulePkg: Initial UDF/ECMA-167 " Paulo Alcantara
2017-09-08 12:41 ` [PATCH v6 4/6] OvmfPkg: Enable UDF " Paulo Alcantara
2017-09-08 12:41 ` [PATCH v6 5/6] ArmVirtPkg: " Paulo Alcantara
2017-09-08 12:41 ` [PATCH v6 6/6] Nt32Pkg: " Paulo Alcantara
2017-09-08 13:25 ` [PATCH v6 0/6] read-only " Laszlo Ersek
2017-09-08 13:43   ` Paulo Alcantara
2017-09-08 15:05   ` Ni, Ruiyu [this message]
2017-09-08 18:47 ` Laszlo Ersek
2017-09-08 19:21   ` Ard Biesheuvel
2017-09-08 19:40     ` Laszlo Ersek
2017-09-08 22:17       ` Ard Biesheuvel
2017-09-08 23:30         ` Paulo Alcantara
2017-09-09 21:52           ` 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=734D49CCEBEEF84792F5B80ED585239D5BA28A47@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