xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@citrix.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	xen-devel@lists.xensource.com
Cc: ian.campbell@citrix.com
Subject: Re: [PATCH v3 2/2] xen/arm: support gzip compressed kernels
Date: Thu, 3 Sep 2015 13:47:28 +0100	[thread overview]
Message-ID: <55E84160.3040404@citrix.com> (raw)
In-Reply-To: <1441193587-5209-2-git-send-email-stefano.stabellini@eu.citrix.com>

On 02/09/15 12:33, Stefano Stabellini wrote:
> @@ -463,6 +520,15 @@ int kernel_probe(struct kernel_info *info)
>          printk("Loading ramdisk from boot module @ %"PRIpaddr"\n",
>                 info->initrd_bootmodule->start);
>  
> +    if (!kernel_decompress(info, &start, &size))

Thinking a bit more about this check. It can fail either because the
kernel is uncompressed or because we fail to decompress/allocate memory.

I think we shouldn't continue if we are in the a latter. I know that we
are continuing all the others caller but this is wrong and make the user
confuse because it will see a message "Loading ELF image into guest" ...

Doing the checking will also make obvious that we support uncompress
kernel when reading the code. It's not straigh-forward while reading the
patch.

> +    {
> +        /* Free the original kernel, update the pointers to the
> +         * decompressed kernel */
> +        dt_unreserved_regions(mod->start, mod->start + mod->size,
> +                init_domheap_pages, 0);
> +        mod->start = start;
> +        mod->size = size;
> +    }
>  #ifdef CONFIG_ARM_64
>      rc = kernel_zimage64_probe(info, start, size);
>      if (rc < 0)

Regards,

-- 
Julien Grall

      parent reply	other threads:[~2015-09-03 12:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-02 11:30 [PATCH v3 0/2] support gzipped kernels on arm Stefano Stabellini
2015-09-02 11:33 ` [PATCH v3 1/2] xen: move perform_gunzip to common Stefano Stabellini
2015-09-02 13:57   ` Jan Beulich
2015-09-02 11:33 ` [PATCH v3 2/2] xen/arm: support gzip compressed kernels Stefano Stabellini
2015-09-03 11:39   ` Julien Grall
2015-09-03 12:47   ` Julien Grall [this message]

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=55E84160.3040404@citrix.com \
    --to=julien.grall@citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xensource.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;
as well as URLs for NNTP newsgroup(s).