qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Richard W.M. Jones" <rjones@redhat.com>
To: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	"qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH v4] aarch64: Allow -kernel option to take a gzip-compressed kernel.
Date: Mon, 4 Aug 2014 09:48:44 +0100	[thread overview]
Message-ID: <20140804084844.GR1302@redhat.com> (raw)
In-Reply-To: <CAEgOgz4Zh=JFBuujG87-fg-k=QwXOgs1RojhfX_hO09K4SzYRg@mail.gmail.com>

On Mon, Aug 04, 2014 at 09:05:39AM +1000, Peter Crosthwaite wrote:
> On Sun, Aug 3, 2014 at 1:45 AM, Richard W.M. Jones <rjones@redhat.com> wrote:
> > +    max_bytes = UBOOT_MAX_GUNZIP_BYTES;
> 
> Why does u-boot's maximum size limit apply here?

We need some maximum to prevent people uploading a kernel (perhaps
from an untrusted source) which is some sort of malicious gzip file
that expands to a huge size.

In this case the u-boot limit is 64 MB which is larger than most
possible kernels, so it seemed like a reasonable limit to choose.
You're right there is no connection to u-boot, except that both the
-kernel option and u-boot have similar concerns with maximum kernel
size, and presumably the u-boot limit is battle-tested.

I'll split the patch into two and send v5 soon.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org

  reply	other threads:[~2014-08-04  8:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-02 15:45 [Qemu-devel] [PATCH v4] aarch64: Allow -kernel option to take a gzip-compressed Richard W.M. Jones
2014-08-02 15:45 ` [Qemu-devel] [PATCH v4] aarch64: Allow -kernel option to take a gzip-compressed kernel Richard W.M. Jones
2014-08-03 23:05   ` Peter Crosthwaite
2014-08-04  8:48     ` Richard W.M. Jones [this message]
2014-08-04  8:52       ` Peter Maydell
2014-08-04  9:11       ` Peter Crosthwaite

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=20140804084844.GR1302@redhat.com \
    --to=rjones@redhat.com \
    --cc=peter.crosthwaite@xilinx.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).