Linux-EFI Archive on lore.kernel.org
 help / color / Atom feed
From: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: <linux-arm-kernel@lists.infradead.org>, <mark.rutland@arm.com>,
	<catalin.marinas@arm.com>, <linux-efi@vger.kernel.org>,
	<will@kernel.org>
Subject: Re: [PATCH 0/2] efi/arm64: execute the kernel in place if possible
Date: Fri, 27 Mar 2020 13:19:00 +0000
Message-ID: <20200327131900.000068aa@Huawei.com> (raw)
In-Reply-To: <20200326165905.2240-1-ardb@kernel.org>

On Thu, 26 Mar 2020 17:59:03 +0100
Ard Biesheuvel <ardb@kernel.org> wrote:

> Update the relocation logic in the EFI stub for arm64 so it runs the
> kernel in place if it was loaded by firmware at an address which allows
> doing so. Then, update the PE/COFF header metadata and increase the
> section alignment to force the UEFI image loader to honour the minimal
> alignment requirement imposed by the kernel proper.
> 
> Ard Biesheuvel (2):
>   efi/libstub/arm64: avoid copying the kernel unnecessarily
>   efi/arm64: increase the PE/COFF alignment so the kernel can run in
>     place
> 
>  arch/arm64/kernel/efi-header.S            | 2 +-
>  arch/arm64/kernel/image-vars.h            | 7 +++++++
>  drivers/firmware/efi/libstub/arm64-stub.c | 9 +++++++++
>  3 files changed, 17 insertions(+), 1 deletion(-)
> 
Hi Ard.

Seems sensible to me so I decided to give it a quick test.
As things stand RELOCATABLE is only selectable by selecting
RANDOMIZE_BASE.   Probably want to be able to configure it
separately (needs some help text, or a specific option to
select CONFIG_RELOCATABLE).

Otherwise, superficially seems to work good for me doing a
boot via pxe/grub on a Kunpeng 920 with some prints added to
make sure it's taking the right paths.

Thanks,

Jonathan




  parent reply index

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-26 16:59 Ard Biesheuvel
2020-03-26 16:59 ` [PATCH 1/2] efi/libstub/arm64: avoid copying the kernel unnecessarily Ard Biesheuvel
2020-03-26 16:59 ` [PATCH 2/2] efi/arm64: increase the PE/COFF alignment so the kernel can run in place Ard Biesheuvel
2020-03-28 14:06   ` Arvind Sankar
2020-03-28 14:10     ` Ard Biesheuvel
2020-03-27 13:19 ` Jonathan Cameron [this message]
2020-03-27 16:39   ` [PATCH 0/2] efi/arm64: execute the kernel in place if possible Ard Biesheuvel

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=20200327131900.000068aa@Huawei.com \
    --to=jonathan.cameron@huawei.com \
    --cc=ardb@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-efi@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=will@kernel.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

Linux-EFI Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-efi/0 linux-efi/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-efi linux-efi/ https://lore.kernel.org/linux-efi \
		linux-efi@vger.kernel.org
	public-inbox-index linux-efi

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-efi


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git