From: Keir Fraser Subject: Re: libxc: Question on kernel image unzipping Date: Thu, 09 Jul 2009 14:53:28 +0100 Message-ID: References: <4A55E3DE.103@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4A55E3DE.103@web.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Andreas Sommer , "xen-devel@lists.xensource.com" Cc: Gerd Hoffmann List-Id: xen-devel@lists.xenproject.org On 09/07/2009 13:34, "Andreas Sommer" wrote: > libxc contains the following function which is used when uncompressing zipped > kernel images: > size_t xc_dom_check_gzip(void *blob, size_t ziplen) > { > ... > return unziplen + 16; > } > The returned unziplen+16 is used for the size of the destination buffer given > to inflate. But it is then also written to the kernel_size attribute of the > xc_dom_image struct. Hence kernel_size does not contain the uncompressed > kernel size but that plus 16. > So why do you always add 16 bytes to the real uncompressed kernel size?? That > doesn't make much sense to me but I need to know it because it is related to > my current work. Gerd Hoffman would be the person to ask. The +16 doesn't appear to me to have any purpose. -- Keir