From: Andreas Robinson <andr345@gmail.com>
To: John Stoffel <john@stoffel.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>, Alain Knaff <alain@knaff.lu>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] lib: add fast lzo decompressor
Date: Fri, 03 Apr 2009 11:49:56 +0200 [thread overview]
Message-ID: <1238752196.8118.185.camel@andreas-desktop> (raw)
In-Reply-To: <18900.52255.798522.393088@stoffel.org>
On Thu, 2009-04-02 at 10:30 -0400, John Stoffel wrote:
> >>>>> "Andreas" == Andreas Robinson <andr345@gmail.com> writes:
>
> Andreas> On Wed, 2009-04-01 at 09:12 -0700, H. Peter Anvin wrote:
> >> OK, I'm more than a bit nervous about that, especially since we're
> >> trying to make the decompression functions more generic.
>
> Andreas> Perhaps the system can default to the safe decompressor for
> Andreas> normal use and choose the fast one if STATIC is defined or
> Andreas> when system_state == SYSTEM_BOOTING?
>
> So how do you prove that data is trusted?
The kernel and initramfs images are implicitly trusted, but that is not
unique to this implementation. None of the decompressors check the data
e.g by comparing checksums, AFAICT.
> What happens on buffer overflow?
The overflow is detected and an error is returned to the caller ... or
the kernel just committed suicide by overwriting itself. *cough*.
Ok, I will put back the checks that actually prevents output overruns.
It is still faster, but could no longer crash the system directly.
There would remain a 3-byte overflow at the end of the output buffer, by
design. However, it can be managed to never be a problem.
> I don't think that a 20% speedup on decompression, with a
> possibility of borking the boot completely is worth it. Or are you
> suggesting that people pre-test their initramfs images with this
> compressor before deciding to boot from it?
The compressor (lzop) has been around for a long while so it's probably
ok.
In case I broke the decompressor the best I can offer is more testing.
In its present form it unpacks a 5 MB initramfs without errors. Does it
need to be tested with more data? In that case, do you have any
suggestions?
Thanks,
Andreas
next prev parent reply other threads:[~2009-04-03 9:50 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-01 13:40 [PATCH 0/2] lib, initramfs: Add initramfs LZO compression Andreas Robinson
2009-04-01 13:40 ` [PATCH 1/2] lib: add fast lzo decompressor Andreas Robinson
2009-04-01 16:12 ` H. Peter Anvin
2009-04-01 19:22 ` Andreas Robinson
2009-04-01 20:55 ` H. Peter Anvin
2009-04-01 22:27 ` Andreas Robinson
2009-04-01 22:42 ` H. Peter Anvin
2009-04-01 23:11 ` Arjan van de Ven
2009-04-01 23:40 ` Nigel Cunningham
2009-04-02 12:30 ` Andreas Robinson
2009-04-02 20:59 ` Nigel Cunningham
2009-04-03 10:54 ` Andreas Robinson
2009-04-03 11:48 ` Nigel Cunningham
2009-04-03 12:53 ` Andreas Robinson
2009-04-03 23:28 ` Nigel Cunningham
2009-04-02 0:02 ` H. Peter Anvin
2009-04-02 12:13 ` Andreas Robinson
2009-04-02 14:30 ` John Stoffel
2009-04-03 9:49 ` Andreas Robinson [this message]
2009-04-03 18:35 ` H. Peter Anvin
2009-04-04 14:34 ` Andreas Robinson
2009-04-01 13:40 ` [PATCH 2/2] lib, initramfs: add support for LZO-compressed initramfs Andreas Robinson
2009-04-01 19:29 ` [PATCH 3/3] lib: enable lzo-compressed kernels Andreas Robinson
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=1238752196.8118.185.camel@andreas-desktop \
--to=andr345@gmail.com \
--cc=alain@knaff.lu \
--cc=hpa@zytor.com \
--cc=john@stoffel.org \
--cc=linux-kernel@vger.kernel.org \
/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