From patchwork Thu Jun 29 08:18:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 106614 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp818345qge; Thu, 29 Jun 2017 01:19:06 -0700 (PDT) X-Received: by 10.98.158.29 with SMTP id s29mr15413938pfd.126.1498724346038; Thu, 29 Jun 2017 01:19:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498724346; cv=none; d=google.com; s=arc-20160816; b=kdRnviWpJebAy5200lgD0FDnwrgAbsgzuy+4IGdA9FXseQQNqVsyRjqOB8wIcFjO3M dbN/SYZAs4nPRmxaBj30vLiV0+cNyvPKsU+tnBZsvtW/9NYcqmc4+QqsJrwrtcTxNfXF l3y6x65JMCqss7JPeiHCg7+ybCZk+pkqpLejFFQjOoRuB6H6fksjJsftYsGDfa9+3GRJ +aR7vXLqWHslDnhsKnra1A6UVFJVwMXiwOtSt0je5u9umBUEPHH5YSl1PbRYzE20Ic4C KX2DCwrcY8hofFbMuaByTTVinlV9YQZLEgaEkmf/sCkZ0QTu1lBSy17ASC7uVa8XDBLB IUMw== 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=YjKnJk4r/uQfsIni79W3ZADGD1GotL0HzIhHh7LAKUo=; b=DgmdeYmD6AWs/xxDvk2ZdcipZDqL/LjSAInMHBUwfpxTGgRskiQhGN+vs+X4KeP2k8 T4t4TPNH3rY8GbDRfzKU3U15L0R6iiduOTSlneE1gloQ4tBYyd4abNcDck4LVXljfreS LwhbfCKSsJg5m9xOyo21Ob5NdUPbUsvNWt7FbkEwbAv70om1wwyoCjR7ukOXmYsOVtxJ n+NaNbbpJtOhbTn3CWogOIMMTbhhaZ3YP6sNQzhpsfqUKMfdnGpZjYk0x/VxrrE7HAtV 5CGxifmGo+telJf+7jwNYQjvFrdEMM17aa035aL19TRxVl2FUo8Aj3A0saKoo4yodfNF viQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.b=Fny/KpIi; 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 h68si3195921pfc.73.2017.06.29.01.19.05; Thu, 29 Jun 2017 01:19:06 -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.b=Fny/KpIi; 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 S1751986AbdF2ITF (ORCPT + 2 others); Thu, 29 Jun 2017 04:19:05 -0400 Received: from mail-wr0-f175.google.com ([209.85.128.175]:34265 "EHLO mail-wr0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752042AbdF2ITE (ORCPT ); Thu, 29 Jun 2017 04:19:04 -0400 Received: by mail-wr0-f175.google.com with SMTP id 77so185498403wrb.1 for ; Thu, 29 Jun 2017 01:19:04 -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=5OnNEz2k7EsWVolQ/o4L6fUwBHNmgjzV69WSGfO1v8A=; b=Fny/KpIiTkfocbfB+mrwSIxYq7oscV/ebxNoQDanlaOkRmzMClnIsbRLmA6ow8KNH2 wnZAND/xSY6ytWhoUQ/k54f5TFmFnKVC5CgMeQaDTXGtQLaeCIi8F+/EJtPeR2XVvav4 lFp98qDdS38WfqmKnKWcnIMzQ4SCKesR8zOD8= 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=5OnNEz2k7EsWVolQ/o4L6fUwBHNmgjzV69WSGfO1v8A=; b=P/gywkC35BnMoaRoW3AE28Y9EbZb7HW+JJbR0b2aAzvwUm2VRfLwz37P9Z+b71E/He o+VYjkzQgxIBMZUukoo8o7EfHIVl724B5C6vHjM6fiB+U3zDMpy6+lQq6l9J6qAeTeb9 Qu9P0OniLfJBoWytSgeBGl9nHM9Bqb0ja58bHc0kYT3aYUcwyT0y4hhWKOgk8/qMov3J +yaRVQV53/UCVWqoV1O1qgRHKZzrbDE9DoaLeEbUQb4xigqUkxIUr4g6Zt8VXAdthUDf 5NPfIHnxeBnQ4l72ErI1uEAVTaXg9BEUgGE9/+3QZbOywHaujYRHkBV/+6voj3QssYqH E4IQ== X-Gm-Message-State: AKS2vOxqydk9BtIBcnu2NMhijPvkwuZuI75yotJA4JGVkvgzc+X8A8rr gFuzSSPWGov2qBDRz99Qsg== X-Received: by 10.223.141.138 with SMTP id o10mr24753449wrb.69.1498724342970; Thu, 29 Jun 2017 01:19:02 -0700 (PDT) Received: from localhost.localdomain ([196.90.227.203]) by smtp.gmail.com with ESMTPSA id p34sm5268190wrc.66.2017.06.29.01.19.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Jun 2017 01:19:02 -0700 (PDT) From: Ard Biesheuvel To: linux-efi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux@armlinux.org.uk Cc: matt@codeblueprint.co.uk, leif.lindholm@linaro.org, Ard Biesheuvel Subject: [PATCH v2 1/7] arm: efi: remove forbidden values from the PE/COFF header Date: Thu, 29 Jun 2017 08:18:43 +0000 Message-Id: <20170629081849.15081-2-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170629081849.15081-1-ard.biesheuvel@linaro.org> References: <20170629081849.15081-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. Signed-off-by: Ard Biesheuvel --- arch/arm/boot/compressed/efi-header.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.9.3 -- 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: