+ make-initramfs-printk-a-warning-on-incorrect-cpio-type.patch added to -mm tree

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

 



The patch titled
     Make initramfs printk a warning on incorrect cpio type
has been added to the -mm tree.  Its filename is
     make-initramfs-printk-a-warning-on-incorrect-cpio-type.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: Make initramfs printk a warning on incorrect cpio type
From: Arjan van de Ven <arjan@xxxxxxxxxxxxxxx>

It turns out that the "-c" option of cpio is highly unportable even between
distros let alone unix variants, and may actually make the wrong type of
cpio archive.  I just wasted quite some time on this, and the kernel can
detect this and warn about it (it's __init memory so it gets thrown away
and thus there is no runtime overhead)

Signed-off-by: Arjan van de Ven <arjan@xxxxxxxxxxxxxxx>
Cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 init/initramfs.c |    4 ++++
 1 files changed, 4 insertions(+)

diff -puN init/initramfs.c~make-initramfs-printk-a-warning-on-incorrect-cpio-type init/initramfs.c
--- a/init/initramfs.c~make-initramfs-printk-a-warning-on-incorrect-cpio-type
+++ a/init/initramfs.c
@@ -182,6 +182,10 @@ static int __init do_collect(void)
 
 static int __init do_header(void)
 {
+	if (memcmp(collected, "070707", 6)==0) {
+		error("incorrect cpio method used: use -H newc option");
+		return 1;
+	}
 	if (memcmp(collected, "070701", 6)) {
 		error("no cpio magic");
 		return 1;
_

Patches currently in -mm which might be from arjan@xxxxxxxxxxxxxxx are

binfmt_elf-randomize-pie-binaries.patch
lockdep-spin_lock_irqsave_nested.patch
lockdep-spin_lock_irqsave_nested-fix.patch
lockdep-spin_lock_irqsave_nested-fix-2.patch
make-initramfs-printk-a-warning-on-incorrect-cpio-type.patch
remove-the-old-bd_mutex-lockdep-annotation.patch
new-bd_mutex-lockdep-annotation.patch
round_jiffies-infrastructure.patch
round_jiffies-infrastructure-fix.patch
user-of-the-jiffies-rounding-patch-ata-subsystem.patch
user-of-the-jiffies-rounding-code-jbd.patch
user-of-the-jiffies-rounding-code-networking.patch
user-of-the-jiffies-rounding-patch-slab.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