From patchwork Tue May 30 18:36: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: 100725 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp352531qge; Tue, 30 May 2017 11:37:01 -0700 (PDT) X-Received: by 10.84.238.200 with SMTP id l8mr82899599pln.85.1496169421210; Tue, 30 May 2017 11:37:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496169421; cv=none; d=google.com; s=arc-20160816; b=Eg5YLgw4Be4YXF5ISZeJwE1cYUywIqUnivXgSEzLdNaDcR3nT04YXCyNN4YwUQWDAj Zm81D/D3buIXlRtuTB/4n3E+Mztrqx2EgQUVqbThUXUYpS+cDVUMV/FjKso3kXpJ52my CIlqC9JwA482jhtgWrXz12fIeAyCtXndw5hfTowqVT1Jf5ZMie58P90WAJ1xWCESO5Ax 0pvl2U1DdXf/j0gvSdBgGp6yyEY2wS5jPEfU0NQ2gUsaOehyIi8iKWiAJQPFc2SwyXzX THropNlzoASYjHlnPIF0negpUaoUAEIYcOcKiVySyMRvDx9BnuetHltkaTnzMPYWbfzW te0w== 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=Id0jI2tvpSrE/XvVhjyDxlxHF3ERFVB52LVXRA9mHbE=; b=Gct1cUkXX0X9mC5McX3KYYnqd806jIlEdZCFnTmp3c+13xPDSJ5i5p+pvY7tQYnv+o ts1R3tZ+h4FKekigq/5VhqjaA12N+tVW7E+EFfUYlMZkKFhe2dxxUwppu3k9zBGRx+wK 54CsXtjHwagklaILCFYjT/svaBAF7ZJeW6FcU7hnw8BZAU1jthh/4wNLNoGXoSPEO+kY CuK+Pt8MGR8kp0AQ3FeWZnYMN6heQJWhRZ8S4dvViBa6giv4tQEZN3zO1It3YuB8eH9u zzVv/1A24lndWxmwlo0NQjfvZdO5TWo/6+AS7QCqmkwJoex9U29z8x6mN7HfBS+DtPeW kBGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; 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 203si14035057pfc.344.2017.05.30.11.37.01; Tue, 30 May 2017 11:37:01 -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; 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 S1751053AbdE3ShA (ORCPT + 2 others); Tue, 30 May 2017 14:37:00 -0400 Received: from mail-wr0-f176.google.com ([209.85.128.176]:34567 "EHLO mail-wr0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750938AbdE3Sg7 (ORCPT ); Tue, 30 May 2017 14:36:59 -0400 Received: by mail-wr0-f176.google.com with SMTP id g76so5639840wrd.1 for ; Tue, 30 May 2017 11:36:58 -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=dQ+msJy45rjvscVKh6DRpdIVGLjjrmSGquKYhpKhRKc=; b=PbRmgqGCAZnqqamJ4m84v8pyvGcfbP0HdPliVbPqIZBLxtYXUJ0g19AlCk2ZjwOhHK +/C3DA8cqRZHsvlUXRj2xBo9uUyEaL8pBeTY0ikMXeKA07ij9mptZSLSH11CieiYFFoU IaOTYxw/yuZeI4qCMR6quoIrE6jMPLf1dg28c= 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=dQ+msJy45rjvscVKh6DRpdIVGLjjrmSGquKYhpKhRKc=; b=mI6C+n9ewTY3Jn1q6LVeAntHzKNsHfkl2nSsXGIgWOeQj2Q2moFHEOEvZLes3N5mt3 otEBhyEgpKCqi+d8IBPTszREmR+mbJaZSkg7o6S06YmgZ0xOjibr8cFO0CKOWUS7zlh9 ZzR6TbOqkOKlGYRrxyL4KELFIkCmFFEscyM20X6rybZVeBMwwRLIcimGopKNocK3yW5k YA5NW1R+vtNgViFyoNggP74Vc8aG+Kr6FK22qF2io9OVgeJquWpQdWjYgcVAd6tsk9xR X6OwiYPuFEPsqtHvCtCS/MBuruGDNBmGwKnlg9e3fmayN0LHTwzvuSIoQB/bY9l2Glm+ Qqfw== X-Gm-Message-State: AODbwcCjc39xrOmGhb46n//hZ72kkuaZgUPrCmFLYHl0tNz83MLHUovM /qIQjXl57FXPKmGoUrTEsA== X-Received: by 10.223.177.155 with SMTP id q27mr15117888wra.173.1496169417742; Tue, 30 May 2017 11:36:57 -0700 (PDT) Received: from localhost.localdomain ([154.144.49.177]) by smtp.gmail.com with ESMTPSA id b8sm15935997wrb.7.2017.05.30.11.36.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 May 2017 11:36:56 -0700 (PDT) From: Ard Biesheuvel To: linux-efi@vger.kernel.org, linux@armlinux.org.uk Cc: linux-arm-kernel@lists.infradead.org, matt@codeblueprint.co.uk, leif.lindholm@linaro.org, Ard Biesheuvel Subject: [PATCH 1/7] arm: efi: remove forbidden values from the PE/COFF header Date: Tue, 30 May 2017 18:36:41 +0000 Message-Id: <20170530183647.28557-2-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170530183647.28557-1-ard.biesheuvel@linaro.org> References: <20170530183647.28557-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 3f7d1b74c5e0..f9e91ba4d0b1 100644 --- a/arch/arm/boot/compressed/efi-header.S +++ b/arch/arm/boot/compressed/efi-header.S @@ -43,7 +43,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. @@ -109,7 +109,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 @@ -120,7 +120,7 @@ section_table: .long 0 @ PointerToLineNumbers .short 0 @ NumberOfRelocations .short 0 @ NumberOfLineNumbers - .long 0xe0500020 @ Characteristics + .long 0xe0000020 @ Characteristics .align 9 __efi_start: