mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Russell King <rmk+lkml@arm.linux.org.uk>
To: Matt Mackall <mpm@selenic.com>, Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/7] inflate pt1: clean up input logic
Date: Sat, 25 Feb 2006 08:55:41 +0000	[thread overview]
Message-ID: <20060225085541.GB27538@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20060225084955.GA27538@flint.arm.linux.org.uk>

On Sat, Feb 25, 2006 at 08:49:55AM +0000, Russell King wrote:
> On Sat, Feb 25, 2006 at 12:51:36AM -0600, Matt Mackall wrote:
> > On Fri, Feb 24, 2006 at 10:19:09PM +0000, Russell King wrote:
> > > How does this change handle the case where we run out of input data?
> > > This condition needs to be handled explicitly because the inflate
> > > functions can infinitely loop.
> > 
> > And if you look at the current users, you'll see that only two of 15
> > actually use it.
> 
> Sorry, I don't understand the relevance of your comment.
> 
> As the code stands in mainline, if we run out of input data, we are
> guaranteed to exit from inflate.
> 
> With your change in this patch set, we no longer guaranteed to exit,
> but will in some circumstances loop indefinitely.
> 
> The problem this causes is that if the ramdisk decompression runs out
> of data, the kernel will just silently hang.
> 
> Please do not back out this fix.
> 
> > > Relying on a bit pattern returned by get_byte() is how this code
> > > pre-fix used to work, and it caused several confused bug reports.
> > 
> > Just about everywhere, get_byte prints an error message and halts.
> 
> And the cases where it doesn't halt is the important case.
> 
> Sorry, but I hope that this code does not get merged as is.  It's
> backing out a fix that I was involved in getting in, and therefore
> I'm completely opposed to your code as it stands.

FYI, here's the bk delta which introduced this fix.

http://linux.bkbits.net:8080/linux-2.6/diffs/lib/inflate.c@1.6?nav=index.html|src/.|src/lib|hist/lib/inflate.c

Of course, not having per-file comments in BK means that we can't get
at the cset comments which explain _why_ it is necessary.  Maybe akpm
keeps an archive of such things?

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core

  reply	other threads:[~2006-02-25  8:55 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <0.399206195@selenic.com>
2006-02-24 20:12 ` [PATCH 2/7] inflate pt1: kill legacy bits Matt Mackall
2006-02-24 20:12 ` [PATCH 3/7] inflate pt1: clean up input logic Matt Mackall
2006-02-24 22:19   ` Russell King
2006-02-25  6:51     ` Matt Mackall
2006-02-25  8:49       ` Russell King
2006-02-25  8:55         ` Russell King [this message]
2006-02-25  9:04           ` Andrew Morton
2006-02-25  9:09             ` Russell King
2006-02-25 14:54         ` Matt Mackall
2006-02-25 18:05           ` Russell King
2006-02-25 21:04             ` Matt Mackall
2006-02-25 21:22               ` Russell King
2006-02-25 21:47                 ` Matt Mackall
2006-02-25 21:58                   ` Russell King
2006-02-25 22:37                     ` Matt Mackall
2006-02-25 22:57                       ` Russell King
2006-02-27  1:18                         ` Johannes Stezenbach
2006-02-27  8:32                           ` Russell King
2006-02-27 12:07                             ` Johannes Stezenbach
2006-02-27 15:47                               ` Russell King
2006-02-27  9:06                         ` Matt Mackall
2006-02-25 22:25                   ` John Reiser
2006-03-07 23:26                 ` H. Peter Anvin
2006-03-10 18:55                   ` Matt Mackall
2006-02-24 20:12 ` [PATCH 1/7] inflate pt1: lindent and manual formatting changes Matt Mackall
2006-02-24 20:12 ` [PATCH 4/7] inflate pt1: start moving globals into iostate Matt Mackall
2006-02-24 20:12 ` [PATCH 5/7] inflate pt1: cleanup Huffman table code Matt Mackall
2006-02-24 21:52   ` John Reiser
2006-02-24 22:06     ` Matt Mackall
2006-02-24 20:12 ` [PATCH 7/7] inflate pt1: eliminate memzero usage Matt Mackall
2006-02-24 20:12 ` [PATCH 6/7] inflate pt1: internalize CRC calculation, cleanup table calculation Matt Mackall

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=20060225085541.GB27538@flint.arm.linux.org.uk \
    --to=rmk+lkml@arm.linux.org.uk \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpm@selenic.com \
    /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

Powered by JetHome