From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mx.groups.io with SMTP id smtpd.web12.15478.1597153776147172190 for ; Tue, 11 Aug 2020 06:49:36 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.93, mailfrom: ray.ni@intel.com) IronPort-SDR: fGM6bWbesXHEtCsG5cwacJdl7RcrOkBkoH0N4VymgmzefllOJmKgDLTSyQZv/zIPdrjHJilVTo yMAKSRNgSM6Q== X-IronPort-AV: E=McAfee;i="6000,8403,9709"; a="151401356" X-IronPort-AV: E=Sophos;i="5.75,461,1589266800"; d="scan'208";a="151401356" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2020 06:49:35 -0700 IronPort-SDR: zGcOe/ZpMFMvQR9qAUAyeAeN0/Ja+k8Ap3N2p7qdD0W6P1iLmYlJFchs+bErYfPVE7qXFPs3hy uVynfT2HXEFQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,461,1589266800"; d="scan'208";a="398531473" Received: from fmsmsx602-2.cps.intel.com (HELO fmsmsx602.amr.corp.intel.com) ([10.18.84.212]) by fmsmga001.fm.intel.com with ESMTP; 11 Aug 2020 06:49:35 -0700 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 11 Aug 2020 06:49:34 -0700 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 11 Aug 2020 06:49:34 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Tue, 11 Aug 2020 06:49:34 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.70]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.49]) with mapi id 14.03.0439.000; Tue, 11 Aug 2020 21:49:31 +0800 From: "Ni, Ray" To: "Gao, Zhichao" , "devel@edk2.groups.io" CC: "Wang, Jian J" , "Wu, Hao A" , Gary Lin , Andrew Fish Subject: Re: [edk2-devel] [PATCH 2/3] MdeModulePkg/PartitionDxe: Remove the check for special MBR Thread-Topic: [edk2-devel] [PATCH 2/3] MdeModulePkg/PartitionDxe: Remove the check for special MBR Thread-Index: AQHWb6q0s+HfU6gulEGX2cqR98vV56kyjQEA//+AdwCAAN8+oA== Date: Tue, 11 Aug 2020 13:49:30 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D5C66910F@SHSMSX104.ccr.corp.intel.com> References: <20200811064302.33188-1-zhichao.gao@intel.com> <20200811064302.33188-3-zhichao.gao@intel.com> <734D49CCEBEEF84792F5B80ED585239D5C66894E@SHSMSX104.ccr.corp.intel.com> In-Reply-To: Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: ray.ni@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I prefer to directly revert the patch. It simplifies the change history. > -----Original Message----- > From: Gao, Zhichao > Sent: Tuesday, August 11, 2020 4:29 PM > To: devel@edk2.groups.io; Ni, Ray > Cc: Wang, Jian J ; Wu, Hao A = ; > Gary Lin ; Andrew Fish > Subject: RE: [edk2-devel] [PATCH 2/3] MdeModulePkg/PartitionDxe: Remove > the check for special MBR >=20 > I also add some variables to calculate StartingLBA and SizeInLBA instead= of > calculate them when they are needed. > I am fine to revert the whole changes. Just make you aware of this. >=20 > Thanks, > Zhichao >=20 > > -----Original Message----- > > From: devel@edk2.groups.io On Behalf Of Ni, Ray > > Sent: Tuesday, August 11, 2020 4:06 PM > > To: Gao, Zhichao ; devel@edk2.groups.io > > Cc: Wang, Jian J ; Wu, Hao A ; > > Gary Lin ; Andrew Fish > > Subject: Re: [edk2-devel] [PATCH 2/3] MdeModulePkg/PartitionDxe: Remov= e > > the check for special MBR > > > > Zhichao, > > Can you please just revert the fix you recently added? > > > > > -----Original Message----- > > > From: Gao, Zhichao > > > Sent: Tuesday, August 11, 2020 2:43 PM > > > To: devel@edk2.groups.io > > > Cc: Wang, Jian J ; Wu, Hao A > > > ; Ni, Ray ; Gary Lin > > > ; Andrew Fish > > > Subject: [PATCH 2/3] MdeModulePkg/PartitionDxe: Remove the check for > > > special MBR > > > > > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2823 > > > > > > Follow the spec definition, the ISO 9660 (and UDF) would be checked > > > before the MBR. So it is not required to skip such MBR talbe that > > > contian the entire block device. > > > > > > Cc: Jian J Wang > > > Cc: Hao A Wu > > > Cc: Ray Ni > > > Cc: Gary Lin > > > Cc: Andrew Fish > > > Signed-off-by: Zhichao Gao > > > --- > > > .../Universal/Disk/PartitionDxe/Mbr.c | 19 ----------------= --- > > > 1 file changed, 19 deletions(-) > > > > > > diff --git a/MdeModulePkg/Universal/Disk/PartitionDxe/Mbr.c > > > b/MdeModulePkg/Universal/Disk/PartitionDxe/Mbr.c > > > index 3830af1ea7..822bf03e92 100644 > > > --- a/MdeModulePkg/Universal/Disk/PartitionDxe/Mbr.c > > > +++ b/MdeModulePkg/Universal/Disk/PartitionDxe/Mbr.c > > > @@ -55,25 +55,6 @@ PartitionValidMbr ( > > > StartingLBA =3D UNPACK_UINT32 (Mbr->Partition[Index1].StartingL= BA); > > > SizeInLBA =3D UNPACK_UINT32 (Mbr->Partition[Index1].SizeInLBA= ); > > > > > > - // > > > - // If the MBR with partition entry covering the ENTIRE disk, i.= e. start at > > LBA0 > > > - // with whole disk size, we treat it as an invalid MBR partitio= n. > > > - // > > > - if ((StartingLBA =3D=3D 0) && > > > - (SizeInLBA =3D=3D (LastLba + 1))) { > > > - // > > > - // Refer to the > > http://manpages.ubuntu.com/manpages/bionic/man8/mkudffs.8.html > > > - // "WHOLE DISK VS PARTITION" > > > - // Some linux ISOs may put the MBR table in the first 512 byt= es for > > compatibility reasons with Windows. > > > - // Linux kernel ignores MBR table if contains partition whi= ch starts at > > sector 0. > > > - // Skip it because we don't have the partition check for UDF(= El Torito > > compatible). > > > - // It would continue to do the whole disk check in the UDF ro= utine. > > > - // > > > - DEBUG ((DEBUG_INFO, "PartitionValidMbr: MBR table has partiti= on > entry > > covering the ENTIRE disk. Don't treat it as a > > > valid MBR.\n")); > > > - > > > - return FALSE; > > > - } > > > - > > > if (Mbr->Partition[Index1].OSIndicator =3D=3D 0x00 || SizeInLBA= =3D=3D 0) { > > > continue; > > > } > > > -- > > > 2.21.0.windows.1 > > > > > >=20 >=20