xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@arm.com>
To: Dirk Behme <dirk.behme@de.bosch.com>,
	xen-devel@lists.xenproject.org,
	Stefano Stabellini <sstabellini@kernel.org>,
	Andrew Cooper <Andrew.Cooper3@citrix.com>,
	Andre Przywara <Andre.Przywara@arm.com>
Subject: Re: [PATCH v4] xen: arm: Update arm64 image header
Date: Wed, 29 Jun 2016 11:32:41 +0100	[thread overview]
Message-ID: <903bbe5a-3da9-7bb8-ff1b-99c71bccb1cd@arm.com> (raw)
In-Reply-To: <1467013990-12796-1-git-send-email-dirk.behme@de.bosch.com>

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@lists.xen.org
http://lists.xen.org/xen-devel

  parent reply	other threads:[~2016-06-29 10:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-27  7:53 [PATCH v4] xen: arm: Update arm64 image header Dirk Behme
2016-06-28 10:18 ` Julien Grall
2016-06-28 18:33   ` Andrew Cooper
2016-06-29 10:32 ` Julien Grall [this message]
2016-06-29 11:08   ` Dirk Behme
2016-06-29 11:22     ` Dirk Behme
2016-06-29 11:31     ` Dirk Behme
2016-06-29 11:47       ` Julien Grall
2016-06-29 11:55         ` Dirk Behme
2016-06-29 12:08           ` Julien Grall
2016-06-29 11:33     ` Julien Grall
2016-06-29 11:38       ` Dirk Behme

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=903bbe5a-3da9-7bb8-ff1b-99c71bccb1cd@arm.com \
    --to=julien.grall@arm.com \
    --cc=Andre.Przywara@arm.com \
    --cc=Andrew.Cooper3@citrix.com \
    --cc=dirk.behme@de.bosch.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).