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=-13.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 3F696C4363A for ; Tue, 27 Oct 2020 07:34:22 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B748A2071A for ; Tue, 27 Oct 2020 07:34:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="bZQvap6O"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="qZffXI3Q" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B748A2071A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To:Message-Id:Date:Subject:To: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=uve2tQ90bhaZUJGxm18h/aqltr+ER+cr3INbcTHQqaA=; b=bZQvap6OEZD0ZGthK/xhIC1r1c ttygXKTcPPNGuTYep/dRCOBOzLGQtuNb2r1bi7AkmltiPhel7max64vdTfqBAjyvcu3cw8l8RfeQF xv1+LZm6dcBzAhJlzOmR0IicLBYzguZSi4AjXSdVqrq1i3lLfKX4FDFZYaf6I/dAMDkXRaC/KhOG9 teaDkkKM9d7xD4C0e2nBtFiC/OQ4uCpCHKR6IFxL6xDYMq/w/tHyDIwLfl5esdoKpsvy68EWx5F3r nMHKKvSb1eybcpLBrqKnmo/oi6wNKN/L0wXN0+g5IqpaWOgsM+ldEhECZBB/caCSqZsRHEXLS/FZf 9lpNVvaw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kXJT3-0001SG-UO; Tue, 27 Oct 2020 07:32:29 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kXJSy-0001RC-BB for linux-arm-kernel@lists.infradead.org; Tue, 27 Oct 2020 07:32:25 +0000 Received: from e123331-lin.nice.arm.com (lfbn-nic-1-188-42.w2-15.abo.wanadoo.fr [2.15.37.42]) (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 5E99A22281; Tue, 27 Oct 2020 07:32:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603783943; bh=U6dDT6BYMNJgNAqMroWbtSUCg3wBB7mXAbb9Phr94I0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qZffXI3QniTC3TX30mL7eSM5Pnm8rFF1eL5XDpHojVfGVRJqfTr2hnDnOkzzaplNG 4A0+RQTH2IFJMTKvF1rYdmoqu5rnlkviu/l99/STTBhYW4N4PfdM6VSoR4u/rKL7xL pwvvx2yhmtvOcEM7Ah59Z7T3XGtyCDFCxZ4FoOvM= From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/4] arm64: efi: increase EFI PE/COFF header padding to 64 KB Date: Tue, 27 Oct 2020 08:32:06 +0100 Message-Id: <20201027073209.2897-2-ardb@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201027073209.2897-1-ardb@kernel.org> References: <20201027073209.2897-1-ardb@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201027_033224_477873_1A30685D X-CRM114-Status: GOOD ( 16.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, catalin.marinas@arm.com, will@kernel.org, james.morse@arm.com, Ard Biesheuvel MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Commit 76085aff29f5 ("efi/libstub/arm64: align PE/COFF sections to segment alignment") increased the PE/COFF section alignment to match the minimum segment alignment of the kernel image, which ensures that the kernel does not need to be moved around in memory by the EFI stub if it was built as relocatable. However, the first PE/COFF section starts at _stext, which is only 4 KB aligned, and so the section layout is inconsistent. Existing EFI loaders seem to care little about this, but it is better to clean this up. So let's pad the header to 64 KB to match the PE/COFF section alignment. Fixes: 76085aff29f5 ("efi/libstub/arm64: align PE/COFF sections to ...") Signed-off-by: Ard Biesheuvel --- arch/arm64/kernel/efi-header.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kernel/efi-header.S b/arch/arm64/kernel/efi-header.S index df67c0f2a077..a71844fb923e 100644 --- a/arch/arm64/kernel/efi-header.S +++ b/arch/arm64/kernel/efi-header.S @@ -147,6 +147,6 @@ efi_debug_entry: * correctly at this alignment, we must ensure that .text is * placed at a 4k boundary in the Image to begin with. */ - .align 12 + .balign SEGMENT_ALIGN efi_header_end: .endm -- 2.17.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel