[edk2-devel] [PATCH V2 0/3] MdeModulePkg/PartitionDxe: Fix the partition check issue

Gao, Zhichao posted 3 patches 3 years, 9 months ago
Failed in applying to current master (apply log)
There is a newer version of this series
.../Universal/Disk/PartitionDxe/Mbr.c         | 42 +++++++++++++++----
.../Universal/Disk/PartitionDxe/Partition.c   |  9 ++++
2 files changed, 44 insertions(+), 7 deletions(-)
[edk2-devel] [PATCH V2 0/3] MdeModulePkg/PartitionDxe: Fix the partition check issue
Posted by Gao, Zhichao 3 years, 9 months ago
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2823

V1:
Separate the UDF from the partition rountine array and do the check
for every media.

V2:
Drop V1 because it is a bug: there should not be two partition types in one media.
1. Correct the LastBlock value in MBR handler. It should be the number of
sectors (512 bytes).
2. Skip the MBR check if the MBR is added for the Windows comaptiblity. We treat such
media as ElTorito and do the check.
3. Fix the partition check bug: One partition type returns already started should
be treated as success to avoid multi partition type be installed into same media.

Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>

Zhichao Gao (3):
  MdeModulePkg/PartitionDxe: Correct the MBR last block value
  MdeModulePkg/PartitionDxe: Skip the MBR that add for CD-ROM
  MdeModulePkg/PartitionDxe: Add already start check for child hanldes

 .../Universal/Disk/PartitionDxe/Mbr.c         | 42 +++++++++++++++----
 .../Universal/Disk/PartitionDxe/Partition.c   |  9 ++++
 2 files changed, 44 insertions(+), 7 deletions(-)

-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62185): https://edk2.groups.io/g/devel/message/62185
Mute This Topic: https://groups.io/mt/75369396/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH V2 0/3] MdeModulePkg/PartitionDxe: Fix the partition check issue
Posted by Wu, Hao A 3 years, 9 months ago
> -----Original Message-----
> From: Gao, Zhichao <zhichao.gao@intel.com>
> Sent: Wednesday, July 8, 2020 10:27 AM
> To: devel@edk2.groups.io
> Cc: Wu, Hao A <hao.a.wu@intel.com>; Ni, Ray <ray.ni@intel.com>; Laszlo
> Ersek <lersek@redhat.com>
> Subject: [PATCH V2 0/3] MdeModulePkg/PartitionDxe: Fix the partition check
> issue
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2823
> 
> V1:
> Separate the UDF from the partition rountine array and do the check for
> every media.
> 
> V2:
> Drop V1 because it is a bug: there should not be two partition types in one
> media.
> 1. Correct the LastBlock value in MBR handler. It should be the number of
> sectors (512 bytes).
> 2. Skip the MBR check if the MBR is added for the Windows comaptiblity. We
> treat such media as ElTorito and do the check.
> 3. Fix the partition check bug: One partition type returns already started
> should be treated as success to avoid multi partition type be installed into
> same media.


Hello Zhichao,

The changes look good to me.
May I know what tests have been done for the series? Thanks.

Best Regards,
Hao Wu


> 
> Cc: Hao A Wu <hao.a.wu@intel.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
> 
> Zhichao Gao (3):
>   MdeModulePkg/PartitionDxe: Correct the MBR last block value
>   MdeModulePkg/PartitionDxe: Skip the MBR that add for CD-ROM
>   MdeModulePkg/PartitionDxe: Add already start check for child hanldes
> 
>  .../Universal/Disk/PartitionDxe/Mbr.c         | 42 +++++++++++++++----
>  .../Universal/Disk/PartitionDxe/Partition.c   |  9 ++++
>  2 files changed, 44 insertions(+), 7 deletions(-)
> 
> --
> 2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62294): https://edk2.groups.io/g/devel/message/62294
Mute This Topic: https://groups.io/mt/75369396/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH V2 0/3] MdeModulePkg/PartitionDxe: Fix the partition check issue
Posted by Gao, Zhichao 3 years, 9 months ago
I have tested on the OVMF with linux iso image like Ubuntu, Fedora and RedHat.

It can enumerate under the shell and load the grub efi application.

Thanks,
Zhichao

> -----Original Message-----
> From: Wu, Hao A <hao.a.wu@intel.com>
> Sent: Thursday, July 9, 2020 1:04 PM
> To: Gao, Zhichao <zhichao.gao@intel.com>; devel@edk2.groups.io
> Cc: Ni, Ray <ray.ni@intel.com>; Laszlo Ersek <lersek@redhat.com>
> Subject: RE: [PATCH V2 0/3] MdeModulePkg/PartitionDxe: Fix the partition check
> issue
> 
> > -----Original Message-----
> > From: Gao, Zhichao <zhichao.gao@intel.com>
> > Sent: Wednesday, July 8, 2020 10:27 AM
> > To: devel@edk2.groups.io
> > Cc: Wu, Hao A <hao.a.wu@intel.com>; Ni, Ray <ray.ni@intel.com>; Laszlo
> > Ersek <lersek@redhat.com>
> > Subject: [PATCH V2 0/3] MdeModulePkg/PartitionDxe: Fix the partition
> > check issue
> >
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2823
> >
> > V1:
> > Separate the UDF from the partition rountine array and do the check
> > for every media.
> >
> > V2:
> > Drop V1 because it is a bug: there should not be two partition types
> > in one media.
> > 1. Correct the LastBlock value in MBR handler. It should be the number
> > of sectors (512 bytes).
> > 2. Skip the MBR check if the MBR is added for the Windows
> > comaptiblity. We treat such media as ElTorito and do the check.
> > 3. Fix the partition check bug: One partition type returns already
> > started should be treated as success to avoid multi partition type be
> > installed into same media.
> 
> 
> Hello Zhichao,
> 
> The changes look good to me.
> May I know what tests have been done for the series? Thanks.
> 
> Best Regards,
> Hao Wu
> 
> 
> >
> > Cc: Hao A Wu <hao.a.wu@intel.com>
> > Cc: Ray Ni <ray.ni@intel.com>
> > Cc: Laszlo Ersek <lersek@redhat.com>
> > Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
> >
> > Zhichao Gao (3):
> >   MdeModulePkg/PartitionDxe: Correct the MBR last block value
> >   MdeModulePkg/PartitionDxe: Skip the MBR that add for CD-ROM
> >   MdeModulePkg/PartitionDxe: Add already start check for child hanldes
> >
> >  .../Universal/Disk/PartitionDxe/Mbr.c         | 42 +++++++++++++++----
> >  .../Universal/Disk/PartitionDxe/Partition.c   |  9 ++++
> >  2 files changed, 44 insertions(+), 7 deletions(-)
> >
> > --
> > 2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62323): https://edk2.groups.io/g/devel/message/62323
Mute This Topic: https://groups.io/mt/75369396/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH V2 0/3] MdeModulePkg/PartitionDxe: Fix the partition check issue
Posted by Wu, Hao A 3 years, 9 months ago
> -----Original Message-----
> From: Gao, Zhichao <zhichao.gao@intel.com>
> Sent: Friday, July 10, 2020 8:41 AM
> To: Wu, Hao A <hao.a.wu@intel.com>; devel@edk2.groups.io
> Cc: Ni, Ray <ray.ni@intel.com>; Laszlo Ersek <lersek@redhat.com>
> Subject: RE: [PATCH V2 0/3] MdeModulePkg/PartitionDxe: Fix the partition
> check issue
> 
> I have tested on the OVMF with linux iso image like Ubuntu, Fedora and
> RedHat.
> 
> It can enumerate under the shell and load the grub efi application.


Thanks Zhichao,

For the series,
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>

Best Regards,
Hao Wu


> 
> Thanks,
> Zhichao
> 
> > -----Original Message-----
> > From: Wu, Hao A <hao.a.wu@intel.com>
> > Sent: Thursday, July 9, 2020 1:04 PM
> > To: Gao, Zhichao <zhichao.gao@intel.com>; devel@edk2.groups.io
> > Cc: Ni, Ray <ray.ni@intel.com>; Laszlo Ersek <lersek@redhat.com>
> > Subject: RE: [PATCH V2 0/3] MdeModulePkg/PartitionDxe: Fix the
> > partition check issue
> >
> > > -----Original Message-----
> > > From: Gao, Zhichao <zhichao.gao@intel.com>
> > > Sent: Wednesday, July 8, 2020 10:27 AM
> > > To: devel@edk2.groups.io
> > > Cc: Wu, Hao A <hao.a.wu@intel.com>; Ni, Ray <ray.ni@intel.com>;
> > > Laszlo Ersek <lersek@redhat.com>
> > > Subject: [PATCH V2 0/3] MdeModulePkg/PartitionDxe: Fix the partition
> > > check issue
> > >
> > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2823
> > >
> > > V1:
> > > Separate the UDF from the partition rountine array and do the check
> > > for every media.
> > >
> > > V2:
> > > Drop V1 because it is a bug: there should not be two partition types
> > > in one media.
> > > 1. Correct the LastBlock value in MBR handler. It should be the
> > > number of sectors (512 bytes).
> > > 2. Skip the MBR check if the MBR is added for the Windows
> > > comaptiblity. We treat such media as ElTorito and do the check.
> > > 3. Fix the partition check bug: One partition type returns already
> > > started should be treated as success to avoid multi partition type
> > > be installed into same media.
> >
> >
> > Hello Zhichao,
> >
> > The changes look good to me.
> > May I know what tests have been done for the series? Thanks.
> >
> > Best Regards,
> > Hao Wu
> >
> >
> > >
> > > Cc: Hao A Wu <hao.a.wu@intel.com>
> > > Cc: Ray Ni <ray.ni@intel.com>
> > > Cc: Laszlo Ersek <lersek@redhat.com>
> > > Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
> > >
> > > Zhichao Gao (3):
> > >   MdeModulePkg/PartitionDxe: Correct the MBR last block value
> > >   MdeModulePkg/PartitionDxe: Skip the MBR that add for CD-ROM
> > >   MdeModulePkg/PartitionDxe: Add already start check for child
> > > hanldes
> > >
> > >  .../Universal/Disk/PartitionDxe/Mbr.c         | 42 +++++++++++++++----
> > >  .../Universal/Disk/PartitionDxe/Partition.c   |  9 ++++
> > >  2 files changed, 44 insertions(+), 7 deletions(-)
> > >
> > > --
> > > 2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62325): https://edk2.groups.io/g/devel/message/62325
Mute This Topic: https://groups.io/mt/75369396/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH V2 0/3] MdeModulePkg/PartitionDxe: Fix the partition check issue
Posted by Laszlo Ersek 3 years, 9 months ago
Hi Zhichao,

On 07/08/20 04:27, Zhichao Gao wrote:
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2823
> 
> V1:
> Separate the UDF from the partition rountine array and do the check
> for every media.
> 
> V2:
> Drop V1 because it is a bug: there should not be two partition types in one media.
> 1. Correct the LastBlock value in MBR handler. It should be the number of
> sectors (512 bytes).
> 2. Skip the MBR check if the MBR is added for the Windows comaptiblity. We treat such
> media as ElTorito and do the check.
> 3. Fix the partition check bug: One partition type returns already started should
> be treated as success to avoid multi partition type be installed into same media.
> 
> Cc: Hao A Wu <hao.a.wu@intel.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
> 
> Zhichao Gao (3):
>   MdeModulePkg/PartitionDxe: Correct the MBR last block value
>   MdeModulePkg/PartitionDxe: Skip the MBR that add for CD-ROM
>   MdeModulePkg/PartitionDxe: Add already start check for child hanldes
> 
>  .../Universal/Disk/PartitionDxe/Mbr.c         | 42 +++++++++++++++----
>  .../Universal/Disk/PartitionDxe/Partition.c   |  9 ++++
>  2 files changed, 44 insertions(+), 7 deletions(-)
> 

I've skimmed the patches briefly -- I've realized that I don't know
enough to usefully review them. I'll defer to Hao and Ray.

Thanks
Laszlo


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62242): https://edk2.groups.io/g/devel/message/62242
Mute This Topic: https://groups.io/mt/75369396/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-