[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v3 2/2] xen/arm: support gzip compressed kernels



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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.