<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/block/partitions, branch v3.12.14</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/block/partitions?h=v3.12.14</id>
<link rel='self' href='https://git.amat.us/linux/atom/block/partitions?h=v3.12.14'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-10-17T04:35:53Z</updated>
<entry>
<title>block/partitions/efi.c: treat size mismatch as a warning, not an error</title>
<updated>2013-10-17T04:35:53Z</updated>
<author>
<name>Doug Anderson</name>
<email>dianders@chromium.org</email>
</author>
<published>2013-10-16T20:46:57Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=87fc0ad2ad8a15de653f4cef7760fa35e689077f'/>
<id>urn:sha1:87fc0ad2ad8a15de653f4cef7760fa35e689077f</id>
<content type='text'>
In commit 27a7c642174e ("partitions/efi: account for pmbr size in lba")
we started treating bad sizes in lba field of the partition that has the
0xEE (GPT protective) as errors.

However, we may run into these "bad sizes" in the real world if someone
uses dd to copy an image from a smaller disk to a bigger disk.  Since
this case used to work (even without using force_gpt), keep it working
and treat the size mismatch as a warning instead of an error.

Reported-by: Josh Triplett &lt;josh@joshtriplett.org&gt;
Reported-by: Sean Paul &lt;seanpaul@chromium.org&gt;
Signed-off-by: Doug Anderson &lt;dianders@chromium.org&gt;
Reviewed-by: Josh Triplett &lt;josh@joshtriplett.org&gt;
Acked-by: Davidlohr Bueso &lt;davidlohr@hp.com&gt;
Tested-by: Artem Bityutskiy &lt;dedekind1@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>block: change config option name for cmdline partition parsing</title>
<updated>2013-09-30T21:31:02Z</updated>
<author>
<name>Paul Gortmaker</name>
<email>paul.gortmaker@windriver.com</email>
</author>
<published>2013-09-30T20:45:19Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=080506ad0aa9c9fbc7879cdd290d55624da08c60'/>
<id>urn:sha1:080506ad0aa9c9fbc7879cdd290d55624da08c60</id>
<content type='text'>
Recently commit bab55417b10c ("block: support embedded device command
line partition") introduced CONFIG_CMDLINE_PARSER.  However, that name
is too generic and sounds like it enables/disables generic kernel boot
arg processing, when it really is block specific.

Before this option becomes a part of a full/final release, add the BLK_
prefix to it so that it is clear in absence of any other context that it
is block specific.

In addition, fix up the following less critical items:
 - help text was not really at all helpful.
 - index file for Documentation was not updated
 - add the new arg to Documentation/kernel-parameters.txt
 - clarify wording in source comments

Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
Cc: Jens Axboe &lt;axboe@kernel.dk&gt;
Cc: Cai Zhiyong &lt;caizhiyong@huawei.com&gt;
Cc: Wei Yongjun &lt;yongjun_wei@trendmicro.com.cn&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>partitions/efi: loosen check fot pmbr size in lba</title>
<updated>2013-09-15T11:10:16Z</updated>
<author>
<name>Davidlohr Bueso</name>
<email>davidlohr@hp.com</email>
</author>
<published>2013-09-13T22:02:22Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6b02fa59a7cf34c548eedee657b07ea6c54d3894'/>
<id>urn:sha1:6b02fa59a7cf34c548eedee657b07ea6c54d3894</id>
<content type='text'>
Matt found that commit 27a7c642174e ("partitions/efi: account for pmbr
size in lba") caused his GPT formatted eMMC device not to boot.  The
reason is that this commit enforced Linux to always check the lesser of
the whole disk or 2Tib for the pMBR size in LBA.  While most disk
partitioning tools out there create a pMBR with these characteristics,
Microsoft does not, as it always sets the entry to the maximum 32-bit
limitation - even though a drive may be smaller than that[1].

Loosen this check and only verify that the size is either the whole disk
or 0xFFFFFFFF.  No tool in its right mind would set it to any value
other than these.

[1] http://thestarman.pcministry.com/asm/mbr/GPT.htm#GPTPT

Reported-and-tested-by: Matt Porter &lt;matt.porter@linaro.org&gt;
Signed-off-by: Davidlohr Bueso &lt;davidlohr@hp.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>block/partitions/efi.c: consistently use pr_foo()</title>
<updated>2013-09-11T22:59:19Z</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@linux-foundation.org</email>
</author>
<published>2013-09-11T21:25:04Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b4bc4a18a226f46fec4ef47f2df28ea209db8b5d'/>
<id>urn:sha1:b4bc4a18a226f46fec4ef47f2df28ea209db8b5d</id>
<content type='text'>
Cc: Davidlohr Bueso &lt;davidlohr@hp.com&gt;
Cc: Karel Zak &lt;kzak@redhat.com&gt;
Cc: Matt Fleming &lt;matt.fleming@intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>partitions/efi: some style cleanups</title>
<updated>2013-09-11T22:59:19Z</updated>
<author>
<name>Davidlohr Bueso</name>
<email>davidlohr@hp.com</email>
</author>
<published>2013-09-11T21:25:03Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=70f637e90ea96187530365eb1ddff8d483ba460e'/>
<id>urn:sha1:70f637e90ea96187530365eb1ddff8d483ba460e</id>
<content type='text'>
Trivial coding style cleanups - still plenty left.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Davidlohr Bueso &lt;davidlohr@hp.com&gt;
Reviewed-by: Karel Zak &lt;kzak@redhat.com&gt;
Acked-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>partitions/efi: delete annoying emacs style comments</title>
<updated>2013-09-11T22:59:18Z</updated>
<author>
<name>Davidlohr Bueso</name>
<email>davidlohr@hp.com</email>
</author>
<published>2013-09-11T21:25:02Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=08009b30a71d9a7c252c4bd677dbd496af9dd1a2'/>
<id>urn:sha1:08009b30a71d9a7c252c4bd677dbd496af9dd1a2</id>
<content type='text'>
I love emacs, but these settings for coding style are annoying when trying
to open the efi.h file.  More important, we already have checkpatch for
that.

Signed-off-by: Davidlohr Bueso &lt;davidlohr@hp.com&gt;
Reviewed-by: Karel Zak &lt;kzak@redhat.com&gt;
Acked-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>partitions/efi: compare first and last usable LBAs</title>
<updated>2013-09-11T22:59:18Z</updated>
<author>
<name>Davidlohr Bueso</name>
<email>davidlohr@hp.com</email>
</author>
<published>2013-09-11T21:25:01Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=aa054bc93743ecce3a27f1655d59674dabc71a54'/>
<id>urn:sha1:aa054bc93743ecce3a27f1655d59674dabc71a54</id>
<content type='text'>
When verifying GPT header integrity, make sure that first usable LBA is
smaller than last usable LBA.

Signed-off-by: Davidlohr Bueso &lt;davidlohr@hp.com&gt;
Reviewed-by: Karel Zak &lt;kzak@redhat.com&gt;
Acked-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>partitions/efi: account for pmbr size in lba</title>
<updated>2013-09-11T22:59:17Z</updated>
<author>
<name>Davidlohr Bueso</name>
<email>davidlohr@hp.com</email>
</author>
<published>2013-09-11T21:25:00Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=27a7c642174eaec627f6a3a254035bf8abd02c5e'/>
<id>urn:sha1:27a7c642174eaec627f6a3a254035bf8abd02c5e</id>
<content type='text'>
The partition that has the 0xEE (GPT protective), must have the size in
lba field set to the lesser of the size of the disk minus one or
0xFFFFFFFF for larger disks.

Signed-off-by: Davidlohr Bueso &lt;davidlohr@hp.com&gt;
Reviewed-by: Karel Zak &lt;kzak@redhat.com&gt;
Acked-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>partitions/efi: detect hybrid MBRs</title>
<updated>2013-09-11T22:59:16Z</updated>
<author>
<name>Davidlohr Bueso</name>
<email>davidlohr@hp.com</email>
</author>
<published>2013-09-11T21:24:58Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b05ebbbbeb67a420d06567c6b9618a9e644d6104'/>
<id>urn:sha1:b05ebbbbeb67a420d06567c6b9618a9e644d6104</id>
<content type='text'>
One of the biggest problems with GPT is compatibility with older, non-GPT
systems.  The problem is addressed by creating hybrid mbrs, an extension,
or variant, of the traditional protective mbr.  This contains, apart from
the 0xEE partition, up three additional primary partitions that point to
the same space marked by up to three GPT partitions.  The result is that
legacy OSs can see the three required MBR partitions and at the same time
ignore the GPT-aware partitions that protect the GPT structures.

While hybrid MBRs are hacks, workarounds and simply not part of the GPT
standard, they do exist and we have no way around them.  For instance, by
default, OSX creates a hybrid scheme when using multi-OS booting.

In order for Linux to properly discover protective MBRs, it must be made
aware of devices that have hybrid MBRs.  No functionality is changed by
this patch, just a debug message informing the user of the MBR scheme that
is being used.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Davidlohr Bueso &lt;davidlohr@hp.com&gt;
Reviewed-by: Karel Zak &lt;kzak@redhat.com&gt;
Acked-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>partitions/efi: do not require gpt partition to begin at sector 1</title>
<updated>2013-09-11T22:59:16Z</updated>
<author>
<name>Davidlohr Bueso</name>
<email>davidlohr@hp.com</email>
</author>
<published>2013-09-11T21:24:57Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3e69ac344007bec5e3987ac86619e140fbc79b72'/>
<id>urn:sha1:3e69ac344007bec5e3987ac86619e140fbc79b72</id>
<content type='text'>
When detecting a valid protective MBR, the Linux kernel isn't picky about
the partition (1-4) the 0xEE is at, but, unlike other operating systems,
it does require it to begin at the second sector (sector 1).  This check,
apart from it not being enforced by UEFI, and causing Linux to potentially
fail to detect any *valid* partitions on the disk, can present problems
when dealing with hybrid MBRs[1].

For compatibility reasons, if the first partition is hybridized, the 0xEE
partition must be small enough to ensure that it only protects the GPT
data structures - as opposed to the the whole disk in a protective MBR.
This problem is very well described by Rod Smith[1]: where MBR-only
partitioning programs (such as older versions of fdisk) can see some of
the disk space as unallocated, thus loosing the purpose of the 0xEE
partition's protection of GPT data structures.

By dropping this check, this patch enables Linux to be more flexible when
probing for GPT disklabels.

[1] http://www.rodsbooks.com/gdisk/hybrid.html#reactions

Signed-off-by: Davidlohr Bueso &lt;davidlohr@hp.com&gt;
Reviewed-by: Karel Zak &lt;kzak@redhat.com&gt;
Acked-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
