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=-7.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,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 4EA7FC4363A for ; Tue, 27 Oct 2020 07:33:58 +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 D51562071A for ; Tue, 27 Oct 2020 07:33:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Y4YbSGns"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="kdUgnyl/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D51562071A 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: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:In-Reply-To:References:List-Owner; bh=0GLrF4wFqKWAQ/lpMQH1/SRM8b3ebtj1R+t4kG5S4BY=; b=Y4YbSGns6VNt/QR9iYWrkMlDDx tuJU/d7blc2PqXAtTZOLh36f67p7yC/vxsE4M/bF+GiLDIuAxXtuN0eYk3H6uD3Gsa9Jj6piC+fLo +fY0eqsFimiMa6HfHHHKbp2TWVqokRwIPUyvlfEnIvitaM+sM6i2epAkU2hnFf+mRuvK7dZ3JRIb/ zmEFmNKl6GrVz0yiiELZO/OSw92FKcV1T/NgwOQItPYLNDWZnN+Wtjzh+epnixee1pBeU/SiaI/pF n09DDIvpxvlRc5vbKnb/IAb4RM9QP/1O7SWVZ/Its0heiL42hR7pPQZgzGijiAf7BMAj/HtujY2Dj pORRdtfw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kXJSz-0001RV-G0; Tue, 27 Oct 2020 07:32:25 +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 1kXJSw-0001Qs-Fo for linux-arm-kernel@lists.infradead.org; Tue, 27 Oct 2020 07:32:23 +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 34C5D22264; Tue, 27 Oct 2020 07:32:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603783941; bh=rD4JtNmRWqWFudQ6rDV4+ukEw01eVBuPocPs7iM+/50=; h=From:To:Cc:Subject:Date:From; b=kdUgnyl/WJt1tf6hdpFeGpj9nn3yPs5yWrRG0Uu6t6Yp3qzppDgiYMa59jOFoMM3Z H2O/+D0qkQUqfOYVfR0tHb486yAZyTokKeCNStnFRzgnKzKPVmcEpRfwjegJta2EZN nIw0JgQkUQmUJ3hYZj/DtVegn0jAdgbblwAMrGwY= From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 0/4] arm64: head: pad Image header to 64 KB and unmap it Date: Tue, 27 Oct 2020 08:32:05 +0100 Message-Id: <20201027073209.2897-1-ardb@kernel.org> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201027_033222_634521_5EA44B2A X-CRM114-Status: GOOD ( 14.10 ) 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 The EFI header definition was updated recently to increase the section alignment to 64 KB, which causes the EFI loader to put the kernel Image at an offset that is guaranteed to be compatible with the kernel's image placement policy when CONFIG_RELOCATABLE=y, removing the need to move it around in DRAM before boot. This change failed to take into account that the first section in the PE/COFF description should start at a 64 KB aligned boundary as well, and so even though EFI loaders don't seem to care, the current PE/COFF layout is not 100% compliant. So let's fix this by padding the size of the .head region to 64 KB, and while at it, removing it from the kernel's executable mapping, which is now guaranteed to be possible regardless of the page size the kernel is running with. And if we don't map it, we don't need to reserve it either. Ard Biesheuvel (4): arm64: efi: increase EFI PE/COFF header padding to 64 KB arm64: omit [_text, _stext) from permanent kernel mapping arm64/head: avoid symbol names pointing into first 64 KB of kernel image arm64: head: tidy up the Image header definition arch/arm64/kernel/efi-header.S | 86 ++++++++++++-------- arch/arm64/kernel/head.S | 19 +---- arch/arm64/kernel/setup.c | 4 +- arch/arm64/kernel/vmlinux.lds.S | 2 +- arch/arm64/mm/init.c | 2 +- arch/arm64/mm/mmu.c | 10 +-- 6 files changed, 61 insertions(+), 62 deletions(-) -- 2.17.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel