[merged] block-partitions-efic-treat-size-mismatch-as-a-warning-not-an-error.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Subject: [merged] block-partitions-efic-treat-size-mismatch-as-a-warning-not-an-error.patch removed from -mm tree
To: dianders@xxxxxxxxxxxx,davidlohr@xxxxxx,dedekind1@xxxxxxxxx,josh@xxxxxxxxxxxxxxxx,seanpaul@xxxxxxxxxxxx,mm-commits@xxxxxxxxxxxxxxx
From: akpm@xxxxxxxxxxxxxxxxxxxx
Date: Thu, 17 Oct 2013 11:13:13 -0700


The patch titled
     Subject: block/partitions/efi.c: treat size mismatch as a warning, not an error
has been removed from the -mm tree.  Its filename was
     block-partitions-efic-treat-size-mismatch-as-a-warning-not-an-error.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Doug Anderson <dianders@xxxxxxxxxxxx>
Subject: block/partitions/efi.c: treat size mismatch as a warning, not an error

In 27a7c64 ("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 <josh@xxxxxxxxxxxxxxxx>
Reported-by: Sean Paul <seanpaul@xxxxxxxxxxxx>
Signed-off-by: Doug Anderson <dianders@xxxxxxxxxxxx>
Reviewed-by: Josh Triplett <josh@xxxxxxxxxxxxxxxx>
Acked-by: Davidlohr Bueso <davidlohr@xxxxxx>
Tested-by: Artem Bityutskiy <dedekind1@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 block/partitions/efi.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff -puN block/partitions/efi.c~block-partitions-efic-treat-size-mismatch-as-a-warning-not-an-error block/partitions/efi.c
--- a/block/partitions/efi.c~block-partitions-efic-treat-size-mismatch-as-a-warning-not-an-error
+++ a/block/partitions/efi.c
@@ -222,11 +222,16 @@ check_hybrid:
 	 * the disk size.
 	 *
 	 * Hybrid MBRs do not necessarily comply with this.
+	 *
+	 * Consider a bad value here to be a warning to support dd'ing
+	 * an image from a smaller disk to a larger disk.
 	 */
 	if (ret == GPT_MBR_PROTECTIVE) {
 		sz = le32_to_cpu(mbr->partition_record[part].size_in_lba);
 		if (sz != (uint32_t) total_sectors - 1 && sz != 0xFFFFFFFF)
-			ret = 0;
+			pr_debug("GPT: mbr size in lba (%u) different than whole disk (%u).\n",
+				 sz, min_t(uint32_t,
+					   total_sectors - 1, 0xFFFFFFFF));
 	}
 done:
 	return ret;
_

Patches currently in -mm which might be from dianders@xxxxxxxxxxxx are

origin.patch
linux-next.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux