All of lore.kernel.org
 help / color / mirror / Atom feed
From: Olaf Hering <olh@suse.de>
To: Andrew Morton <akpm@osdl.org>, viro@parcelfarce.linux.theplanet.co.uk
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] handle 512 byte aligned gzip headers
Date: Sun, 23 May 2004 20:17:13 +0200	[thread overview]
Message-ID: <20040523181713.GA17359@suse.de> (raw)


This one is from Al, maybe he sent it already. Some compressed initramfs
cpio archive cant be uncompressed with current kernels.

 <viro>  olh: what happens does happen when the end of final header is well-aligned
 <viro>  olh: cpio does pad the sucker otherwise and that's enough to mask the bug in do_skip()
 <viro>  olh: if the end of header is on a multiple of 512, as it is in your case, it _is_ the last thing gunzip shoves into window
 <viro>  olh: and there's nothing past it
 <viro>  olh: fix is trivial - in do_skip() replace <= with <

diff -purNX /tmp/kernel_exclude.txt linux-2.6.7-rc1.orig/init/initramfs.c linux-2.6.7-rc1/init/initramfs.c
--- linux-2.6.7-rc1.orig/init/initramfs.c	2004-05-10 02:31:59.000000000 +0000
+++ linux-2.6.7-rc1/init/initramfs.c	2004-05-23 17:44:45.000000000 +0000
@@ -207,7 +207,7 @@ static int __init do_header(void)
 
 static int __init do_skip(void)
 {
-	if (this_header + count <= next_header) {
+	if (this_header + count < next_header) {
 		eat(count);
 		return 1;
 	} else {
-- 
USB is for mice, FireWire is for men!

sUse lINUX ag, nÜRNBERG

                 reply	other threads:[~2004-05-23 18:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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-all 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=20040523181713.GA17359@suse.de \
    --to=olh@suse.de \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@parcelfarce.linux.theplanet.co.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.