From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.120]) by mx.groups.io with SMTP id smtpd.web12.13949.1594223956921973603 for ; Wed, 08 Jul 2020 08:59:17 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YTD7p/JK; spf=pass (domain: redhat.com, ip: 207.211.31.120, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1594223956; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wv3bJZZYReZP2uuPa6HVIQTl3BSIYQIxcYhnos2e7Tc=; b=YTD7p/JKWgaI86jZdve/SUh7eQNnC27ZQofwzP767Hd82HC8pHUrpzc0bODoDIGHEh4I51 DwOCCERD8mPhDogPpln2ljtsaqc0KRDTRiR5KY5d8REgEsSgw+cbnqJuUEG+DRpPE2rxIU gnDDUxZjP6DO9RIq+oPpoNpiaFO6ncE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-343-HzzPqA5MNUS8NVxuw07O3Q-1; Wed, 08 Jul 2020 11:59:11 -0400 X-MC-Unique: HzzPqA5MNUS8NVxuw07O3Q-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BC1AE1085933; Wed, 8 Jul 2020 15:59:10 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-112-73.ams2.redhat.com [10.36.112.73]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7D7BF10016E8; Wed, 8 Jul 2020 15:59:09 +0000 (UTC) Subject: Re: [PATCH V2 0/3] MdeModulePkg/PartitionDxe: Fix the partition check issue To: Zhichao Gao , devel@edk2.groups.io Cc: Hao A Wu , Ray Ni References: <20200708022722.27024-1-zhichao.gao@intel.com> From: "Laszlo Ersek" Message-ID: <7dc3a38f-456f-7fed-169a-107481ee425b@redhat.com> Date: Wed, 8 Jul 2020 17:59:08 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20200708022722.27024-1-zhichao.gao@intel.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lersek@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit 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 > Cc: Ray Ni > Cc: Laszlo Ersek > 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 | 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