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

Re: [Xen-devel] [PATCH v4] xen: arm: Update arm64 image header



Hi Dirk,

On 27/06/2016 08:53, Dirk Behme wrote:
+    if ( (end - start) > size ) {
+        printk(XENLOG_ERR "Error: Kernel Image size: %lu bytes > bootmodule size: 
%lu bytes\n",
+               zimage.image_size, (uint64_t)size);
+        printk(XENLOG_ERR "The field 'size' does not match the size of 
blob!\n");
         return -EINVAL;
+    }

This patch is breaking boot on any ARM64 platform (UEFI and bootwrapper). The 'image_size' is the size of the kernel with BSS included. So the bootmodule will always be smaller than 'image_size'.

(XEN) Loading kernel from boot module @ 0000000080080000
(XEN) Error: Kernel Image size: 16482304 bytes > bootmodule size: 15925760bytes
(XEN) The field 'size' does not match the size of blob!

So I think this field is intended to be used to tell the bootloader that kernel footprint will "image_size". So the bootloader will not attempt to place any modules (DT, ramdisk...) within this region.

We don't want to use this field to copy the kernel because we may end up to copy extra memory which could contain sensitive data.

Given that the main purpose of this patch is to use the field 'image_size', I would just revert the patch until we figured out what to do.

Dirk, as this patch is meant to be ARM64 only, I am wondering how you were able to boot DOM0 with the patch applied.

Currently the pushgate for ARM64 is only build testing, so I should have tested this patch before giving my ack. I am sorry for that.

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