From patchwork Fri Aug 18 19:49:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 110442 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp1345317qge; Fri, 18 Aug 2017 12:52:05 -0700 (PDT) X-Received: by 10.98.144.135 with SMTP id q7mr9859317pfk.229.1503085925056; Fri, 18 Aug 2017 12:52:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503085925; cv=none; d=google.com; s=arc-20160816; b=Mq5cu9RR8jGwj9WBBA1ipRCpv31LILw14hAabovIBOCFBE8vw5lCtZx2WTBP4azSfO n7jbUQtT6/Qw0+TKxmFu5aD5APOng8jdFvmoSSeF1ZZkb4SpXsaZ7avY+q90A+TH1fYb cO3wyp5SI7earm9hab1QLvvSzAZkGrwuKRiqyBL39cbqnmxy5LTPTcqvP9gFfe/nlFVU 3jQBBs6FGLd8dw1m8rIcVnXD41f9NLBLnV52UWZviPSC6+cyyYZZ/10lt3oG7AcVQA1S GUZW2UjT62Ygdk+Y7jWYoWg6NzvVcoE0Y7sOkZAB4JqIpecfSiLq/EleLx/uiDEizPaA B5pQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=9+K0aar7tvcs+W97Sya6dLEDJZWP9TBVR/E9yTkSoos=; b=nul0NGl5a+5bRhZC13/elD0eLmgw9XXr7BEglCS+Da0cIcjTTi+kHnUPhSOOH7qLYX j+W3d7YRJNqaLwCZQo78NGGu1c/pH/P+Gp7b7J4nlXgUa6BsPD7bb9r7xR6ctqiJG/sP TYQQzmpJ5upcgaKN3RIuKlcbQG/nbeyyJ6aK2WvR6FdgVnvCBUXRjl5ndKH3YfdllZD/ 7mcgfkg1ZZqH10sYy5V1cnzEf99ag1id3MlVsNUXBOMadlPgAUwvNfhR8rZ4f3PUVAT6 XCZJCFHR6mffK1t37/nvT9uu1EvPXo9tF/U1qQzEB+/cuRd5Cv/U5yAc3XMovReaE1LN HXdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=DJvmWZOk; spf=pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-efi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x32si4261670pld.52.2017.08.18.12.52.04; Fri, 18 Aug 2017 12:52:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=DJvmWZOk; spf=pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-efi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751843AbdHRTwE (ORCPT + 2 others); Fri, 18 Aug 2017 15:52:04 -0400 Received: from mail-wm0-f45.google.com ([74.125.82.45]:37278 "EHLO mail-wm0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752477AbdHRTuV (ORCPT ); Fri, 18 Aug 2017 15:50:21 -0400 Received: by mail-wm0-f45.google.com with SMTP id i66so7294980wmg.0 for ; Fri, 18 Aug 2017 12:50:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=pWN2jaOBtg76WmAL3uEQttXaWdwPmXHJOh+qAT+xW2s=; b=DJvmWZOkh6nvpQK8JcmEq2xpmalu6DN7C6TBjDBpuNRyT+AYrne7xH8BIk5WspOkLj O5aq8xfYBS52jSZp798ozpZDL4Ht8G0LVGC+b/DZzqgh3R/1V0hT/qBX5LbfHnjTHyLt +s7S6FrIbyWE7BPLUkWnGKIiqTpZM0k+Hs5M4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=pWN2jaOBtg76WmAL3uEQttXaWdwPmXHJOh+qAT+xW2s=; b=D49tjMa2Mv8aJ8TQF7NE178TFASI5H0q3HeC9Exp9v9qVaGKnkLVCHZeCCSLo/n2Cw O0kXS3Qb4x3/fy/QZMB7uuoc/Ygqo8tO/0UBy+cOjwVuTM4BQOAPOswejb/tivBl0BWL zmESaF2KqYY6yKgZDjH9HWo8mrVCJq6otCAzHlPPfqOqFUqqdrzTL9UJkW8u+oOqR7gn +fmd8slWi//vpTyPUcwUZsRJX09+ABpNxQj8BuAOGG/QhzXXwalKkkgg+90qKs3aQ0KR jbxzwW2W/4vbVjc2QS+4L9/bG9CtD3FwTvSPGibUBbP82xzyEgT/If2Wka3dZ1Kc4Ytg hYEw== X-Gm-Message-State: AHYfb5gz/SSZTaPs4cNlLxuTszMGGnx0EwYtLLrSTb4cXfiXk1SWaoU1 1dhkpVcT9jdrCDOZ8pdu7A== X-Received: by 10.28.225.139 with SMTP id y133mr1958805wmg.41.1503085819863; Fri, 18 Aug 2017 12:50:19 -0700 (PDT) Received: from localhost.localdomain ([154.146.161.128]) by smtp.gmail.com with ESMTPSA id k29sm5571168wrk.56.2017.08.18.12.50.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Aug 2017 12:50:19 -0700 (PDT) From: Ard Biesheuvel To: linux-efi@vger.kernel.org, Ingo Molnar , Thomas Gleixner , "H . Peter Anvin" Cc: Ard Biesheuvel , linux-kernel@vger.kernel.org, Matt Fleming Subject: [PATCH 08/14] arm: efi: remove forbidden values from the PE/COFF header Date: Fri, 18 Aug 2017 20:49:41 +0100 Message-Id: <20170818194947.19347-9-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170818194947.19347-1-ard.biesheuvel@linaro.org> References: <20170818194947.19347-1-ard.biesheuvel@linaro.org> Sender: linux-efi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-efi@vger.kernel.org Bring the PE/COFF header in line with the PE/COFF spec, by setting NumberOfSymbols to 0, and removing the section alignment flags. Cc: Matt Fleming Signed-off-by: Ard Biesheuvel --- arch/arm/boot/compressed/efi-header.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe linux-efi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm/boot/compressed/efi-header.S b/arch/arm/boot/compressed/efi-header.S index a17ca8d78656..4169b900d9d4 100644 --- a/arch/arm/boot/compressed/efi-header.S +++ b/arch/arm/boot/compressed/efi-header.S @@ -44,7 +44,7 @@ coff_header: .short 2 @ nr_sections .long 0 @ TimeDateStamp .long 0 @ PointerToSymbolTable - .long 1 @ NumberOfSymbols + .long 0 @ NumberOfSymbols .short section_table - optional_header @ SizeOfOptionalHeader .short 0x306 @ Characteristics. @@ -110,7 +110,7 @@ section_table: .long 0 @ PointerToLineNumbers .short 0 @ NumberOfRelocations .short 0 @ NumberOfLineNumbers - .long 0x42100040 @ Characteristics + .long 0x42000040 @ Characteristics .ascii ".text\0\0\0" .long _end - __efi_start @ VirtualSize @@ -121,7 +121,7 @@ section_table: .long 0 @ PointerToLineNumbers .short 0 @ NumberOfRelocations .short 0 @ NumberOfLineNumbers - .long 0xe0500020 @ Characteristics + .long 0xe0000020 @ Characteristics .align 9 __efi_start: