From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mx.groups.io with SMTP id smtpd.web10.11039.1594689784136109203 for ; Mon, 13 Jul 2020 18:23:04 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.65, mailfrom: zhichao.gao@intel.com) IronPort-SDR: DMeZUQwedwEqOHKcM6d4KIf6DlE4TMje4JXYzAARCT0YK0uBOK9g9kKaOD2ig967/NOBfy1vJx pNwzekofOXIw== X-IronPort-AV: E=McAfee;i="6000,8403,9681"; a="148762701" X-IronPort-AV: E=Sophos;i="5.75,349,1589266800"; d="scan'208";a="148762701" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jul 2020 18:23:03 -0700 IronPort-SDR: AyOpP5dKrHhF6EBZ06sU6E/pCMWERPLL1W1KJ1Qf5zYLOQFO6DkwwH5uetVaWETB4J8HxoQygt ID1OM3JUfAcw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,349,1589266800"; d="scan'208";a="285590320" Received: from fieedk001.ccr.corp.intel.com ([10.239.33.114]) by orsmga006.jf.intel.com with ESMTP; 13 Jul 2020 18:23:01 -0700 From: "Gao, Zhichao" To: devel@edk2.groups.io Cc: Hao A Wu , Ray Ni Subject: [PATCH V3 0/3] MdeModulePkg/PartitionDxe: Fix the partition check issue Date: Tue, 14 Jul 2020 09:22:56 +0800 Message-Id: <20200714012259.30504-1-zhichao.gao@intel.com> X-Mailer: git-send-email 2.21.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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. V3: patch #1: Remove the useless variable and add the reason and impact of the fix. patch #2: Remove useless condition and make the comments more clear. Cc: Hao A Wu Cc: Ray Ni Signed-off-by: Zhichao Gao 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 | 50 +++++++++++++++---- .../Universal/Disk/PartitionDxe/Partition.c | 9 ++++ 2 files changed, 48 insertions(+), 11 deletions(-) -- 2.21.0.windows.1