From: Paulo Alcantara <pcacjr@zytor.com>
To: edk2-devel@lists.01.org
Cc: Paulo Alcantara <pcacjr@zytor.com>,
Michael D Kinney <michael.d.kinney@intel.com>,
Liming Gao <liming.gao@intel.com>,
Laszlo Ersek <lersek@redhat.com>, Ruiyu Ni <ruiyu.ni@intel.com>,
Star Zeng <star.zeng@intel.com>,
Jiewen Yao <jiewen.yao@intel.com>
Subject: [PATCH v3 0/2] UDF partition driver fix
Date: Wed, 20 Sep 2017 15:16:21 -0300 [thread overview]
Message-ID: <cover.1505929933.git.pcacjr@zytor.com> (raw)
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=707
Hi,
This patchset fixes a bug in Partition driver that created UDF logical
partitions by using entire block device space and thus polluting
protocol database 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.
I've had a chance to test these changes with my 32GiB USB stick
and formatted it on Windows 10 with `format` command. The UDF revisions
I tested (by specifying 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
adds 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=hd /dev/sdX` command in Linux.
Remember, the *officially* supported revision is 2.60, however all
revisions 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 that's why all those revisions worked with
this implementation.
Well, at least this what I understood when looking at the
specifications. Please correct me if I'm wrong.
Please, test building these changes in toolchains other than GCC and
make sure they don't break the world :-)
Thanks!
Paulo
Repo: https://github.com/pcacjr/edk2.git
Branch: udf-partition-fix-v3
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Reported-by: Ruiyu Ni <ruiyu.ni@intel.com>
Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
---
Paulo Alcantara (2):
MdePkg: Add UDF volume structure definitions
MdeModulePkg/PartitionDxe: Fix creation of UDF logical partition
MdeModulePkg/Universal/Disk/PartitionDxe/Udf.c | 363 ++++++++++--
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 | 63 +-
6 files changed, 665 insertions(+), 569 deletions(-)
--
2.11.0
next reply other threads:[~2017-09-20 18:16 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-20 18:16 Paulo Alcantara [this message]
2017-09-20 18:16 ` [PATCH v3 1/2] MdePkg: Add UDF volume structure definitions Paulo Alcantara
2017-09-22 2:50 ` Ni, Ruiyu
2017-09-22 13:54 ` Paulo Alcantara
2017-09-20 18:16 ` [PATCH v3 2/2] MdeModulePkg/PartitionDxe: Fix creation of UDF logical partition Paulo Alcantara
2017-09-21 8:08 ` Wu, Hao A
2017-09-21 8:49 ` Zeng, Star
2017-09-21 13:22 ` Paulo Alcantara
2017-09-21 12:44 ` Wu, Hao A
2017-09-21 13:29 ` Paulo Alcantara
2017-09-21 13:47 ` Zeng, Star
2017-09-21 13:52 ` Paulo Alcantara
2017-09-21 14:16 ` Paulo Alcantara
2017-09-22 2:26 ` Zeng, Star
2017-09-22 2:59 ` Ni, Ruiyu
2017-09-20 19:25 ` [PATCH v3 0/2] UDF partition driver fix Laszlo Ersek
2017-09-20 19:38 ` Paulo Alcantara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1505929933.git.pcacjr@zytor.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox