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

Re: [Xen-devel] [PATCH v2 2/6] libxc/restore: Bail if unknown options are found



On 08/05/15 22:14, Andrew Cooper wrote:
> When restoring a domain, check for unknown options in Image Header.  Nothing
> good will come from attempting to continue.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> CC: David Vrabel <david.vrabel@xxxxxxxxxx>
> CC: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
> CC: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
> CC: Wei Liu <wei.liu2@xxxxxxxxxx>
> CC: Yang Hongyang <yanghy@xxxxxxxxxxxxxx>
> 
> ---
> David: The wording of the spec disallows even adding new options without
> bumping the protocol version.  Do we want to relax the restriction slightly?
> ---
>  docs/specs/libxc-migration-stream.pandoc |    5 +++--
>  tools/libxc/xc_sr_restore.c              |    6 ++++++
>  tools/libxc/xc_sr_stream_format.h        |    2 ++
>  3 files changed, 11 insertions(+), 2 deletions(-)
> 
> diff --git a/docs/specs/libxc-migration-stream.pandoc 
> b/docs/specs/libxc-migration-stream.pandoc
> index 520240f..fa501e7 100644
> --- a/docs/specs/libxc-migration-stream.pandoc
> +++ b/docs/specs/libxc-migration-stream.pandoc
> @@ -131,11 +131,12 @@ version     0x00000002.  The version of this 
> specification.
>  
>  options     bit 0: Endianness.  0 = little-endian, 1 = big-endian.
>  
> -            bit 1-15: Reserved.
> +            bit 1-15: Reserved. (Must be zero)
>  --------------------------------------------------------------------
>  
>  The endianness shall be 0 (little-endian) for images generated on an
> -i386, x86_64, or arm host.
> +i386, x86_64, or arm host.  The receiving side should confirm that no
> +unexpected options have been specified.

The image header provides information about the format of the image.  I
suppose one could make an argument that an checkpointed stream is an
infinite stream vs finite, but I think a CHECKPOINT_ENABLE record might
be better?

David

_______________________________________________
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®.