From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5FE9CC43331 for ; Thu, 26 Mar 2020 16:59:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 32B992073E for ; Thu, 26 Mar 2020 16:59:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585241995; bh=rV3h8qQW0FYqgWhqZ43zHTAw48+LqjuopHgk1oz9eFI=; h=From:To:Cc:Subject:Date:List-ID:From; b=RjcRgAf85PVWortHYres10236YqfirzJTRTamkBCAIPSBmnJw5dIKSq4An00Z7n4B cJp4eGYArKy8xPiTZ+xLTA78o3lAY0Og2pmaEA7VuTH246kb7BTfN/+e8lFRMcxuvf WzHsMkyghBkIt1bPl7ghulUaSeAyAJJOLDei8eWo= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727505AbgCZQ7z (ORCPT ); Thu, 26 Mar 2020 12:59:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:59366 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727393AbgCZQ7y (ORCPT ); Thu, 26 Mar 2020 12:59:54 -0400 Received: from e123331-lin.home (amontpellier-657-1-18-247.w109-210.abo.wanadoo.fr [109.210.65.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 11C1920714; Thu, 26 Mar 2020 16:59:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585241994; bh=rV3h8qQW0FYqgWhqZ43zHTAw48+LqjuopHgk1oz9eFI=; h=From:To:Cc:Subject:Date:From; b=OAJFIulTl2hFO5S3shSIYNsdtc5wosrzM1sChFB1FGubeEBrFs0nliXdBDWSTXmIJ kKrCamJcH5xpKtRdVYB02/2g9KeL1QPOH9FtnWqXaqvhu4EvHokac++F0yxnBg2/lQ caQFPX3w5M1ydgcJNBAOejNcvETos0V/CdPOdXNM= From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org Cc: catalin.marinas@arm.com, will@kernel.org, mark.rutland@arm.com, linux-efi@vger.kernel.org, Ard Biesheuvel Subject: [PATCH 0/2] efi/arm64: execute the kernel in place if possible Date: Thu, 26 Mar 2020 17:59:03 +0100 Message-Id: <20200326165905.2240-1-ardb@kernel.org> X-Mailer: git-send-email 2.17.1 Sender: linux-efi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-efi@vger.kernel.org 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(-) -- 2.17.1