|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2] libxc: don't fail domain creation when unpacking initrd fails
>>> On 23.01.18 at 11:55, <roger.pau@xxxxxxxxxx> wrote:
> On Mon, Dec 04, 2017 at 05:46:41AM -0700, Jan Beulich wrote:
>> At least Linux kernels have been able to work with gzip-ed initrd for
>> quite some time; initrd compressed with other methods aren't even being
>> attempted to unpack. Furthermore the unzip-ing routine used here isn't
>> capable of dealing with various forms of concatenated files, each of
>> which was gzip-ed separately (it is this particular case which has been
>> the source of observed VM creation failures).
>>
>> Hence, if unpacking fails, simply hand the the compressed blob to the
>> guest as is.
>
> Sadly this will have to be rebased on top of staging,
> xc_dom_build_ramdisk was renamed to xc_dom_build_module.
That shouldn't be difficult to do, but makes little sense until I know
I don't need to make other changes. Note for how long the patch
has been pending.
>> @@ -1020,11 +1015,18 @@ static int xc_dom_build_ramdisk(struct x
>> if ( unziplen )
>> {
>> if ( xc_dom_do_gunzip(dom->xch, dom->ramdisk_blob,
>> dom->ramdisk_size,
>> - ramdiskmap, ramdisklen) == -1 )
>> + ramdiskmap, unziplen) != -1 )
>> + return 0;
>> + if ( dom->ramdisk_size > ramdisklen )
>
> AFAICT this would mean that the non-gzipped ramdisk would be bigger
> than the gzipped one?
Yes (an at least theoretical possibility).
> The code LGTM.
Thanks, Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |