From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.65; helo=mga03.intel.com; envelope-from=ruiyu.ni@intel.com; receiver=edk2-devel@lists.01.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id C673D2095E52D for ; Sun, 24 Sep 2017 17:28:10 -0700 (PDT) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Sep 2017 17:31:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,434,1500966000"; d="scan'208";a="315687694" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga004.fm.intel.com with ESMTP; 24 Sep 2017 17:31:20 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 24 Sep 2017 17:31:20 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.213]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.152]) with mapi id 14.03.0319.002; Mon, 25 Sep 2017 08:31:18 +0800 From: "Ni, Ruiyu" To: Paulo Alcantara , "edk2-devel@lists.01.org" CC: "Kinney, Michael D" , "Gao, Liming" , Laszlo Ersek , "Zeng, Star" , "Yao, Jiewen" Thread-Topic: [PATCH v4 0/2] UDF partition driver fix Thread-Index: AQHTM85hrdP8Of05yk++BneNrzbCWKLEw48Q Date: Mon, 25 Sep 2017 00:31:18 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D5BA67DBA@SHSMSX103.ccr.corp.intel.com> References: In-Reply-To: Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH v4 0/2] UDF partition driver fix X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Sep 2017 00:28:11 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ruiyu Ni -----Original Message----- From: Paulo Alcantara [mailto:pcacjr@zytor.com]=20 Sent: Saturday, September 23, 2017 2:12 AM To: edk2-devel@lists.01.org Cc: Paulo Alcantara ; Kinney, Michael D ; Gao, Liming ; Laszlo Ersek ; Ni, Ruiyu ; Zeng, Star ; Y= ao, Jiewen Subject: [PATCH v4 0/2] UDF partition driver fix REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D707 Hi, This patchset fixes a bug in Partition driver that created UDF logical part= itions by using entire block device space and thus polluting protocol datab= ase with broken handles. v1->v2: - Followed Laszlo's suggestions to submit a proper patchset. Thanks! - As I'm still waiting for Ruiyu and Star to test this fix, I took advantage of it and did some code cleanups :-) v2->v3: - Followed Ruiyu's suggestions to improve code and add additional checks for ensuring a valid UDF file system and supported by current EDK2 UDF file system implementation. Also run Ecc.py to make sure the files I touched did not break EDK2 C Coding Style, as well as PatchCheck.py for mal-formed patches. v3->v4: - Change 2/2's title as suggested by Star. - Remove UDF_TAG_ID() and refactor out UDF_ENTITY_ID structure as suggested by Ruiyu. - Tested build with VS2015 toolchain. I've had a chance to test these changes with my 32GiB USB stick and formatt= ed it on Windows 10 with `format` command. The UDF revisions I tested (by s= pecifying it with "/R:revision") were 1.02, 1.50, 2.00, 2.01 (default) and 2.50. They all worked except the 2.50 revision which add= s a Type 2 (Metadata) Partition and it's not supported by current EDK2 UDF implementation -- which handles only Type 1 (Physical) Partitions.= The UDF 2.60 revision I tested with the usual `sudo mkudffs -b 512 --media= -type=3Dhd /dev/sdX` command in Linux. Remember, the *officially* supported revision is 2.60, however all revision= s use the same volume structures as defined by ECMA 167 specification, and = they usually differ from each other by means of new optional features, so t= hat's why all those revisions worked with this implementation. Well, at least this what I understood when looking at the specifications. P= lease correct me if I'm wrong. Please, test building these changes in toolchains other than GCC and make s= ure they don't break the world :-) Thanks! Paulo Repo: https://github.com/pcacjr/edk2.git Branch: udf-partition-fix-v4 Cc: Michael D Kinney Cc: Liming Gao Cc: Laszlo Ersek Cc: Ruiyu Ni Cc: Star Zeng Cc: Jiewen Yao Contributed-under: TianoCore Contribution Agreement 1.1 Reported-by: Ruiyu Ni Signed-off-by: Paulo Alcantara --- Paulo Alcantara (2): MdePkg: Add UDF volume structure definitions MdeModulePkg/UDF: Fix creation of UDF logical partition MdeModulePkg/Universal/Disk/PartitionDxe/Udf.c | 366 ++++++++++= -- MdeModulePkg/Universal/Disk/UdfDxe/File.c | 16 +- MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c | 627 ++++++++--= ---------- MdeModulePkg/Universal/Disk/UdfDxe/Udf.c | 7 - MdeModulePkg/Universal/Disk/UdfDxe/Udf.h | 158 ++--- MdePkg/Include/IndustryStandard/Udf.h | 97 ++- 6 files changed, 698 insertions(+), 573 deletions(-) -- 2.13.3.windows.1