From patchwork Tue Oct 24 06:23:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 10023565 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2B15360245 for ; Tue, 24 Oct 2017 06:28:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 22C0E2897C for ; Tue, 24 Oct 2017 06:28:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1620D28982; Tue, 24 Oct 2017 06:28:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9242C2897C for ; Tue, 24 Oct 2017 06:28:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.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=a50ojayvnrMhE6NE8qzkSh5cxpvViz9oTGdCi81eVW8=; b=maJLy4h/yUuCOsrzZmlkqiAAaO GBDgqoCN01O27op6elH34DgrYpZTmzqxIBkj3zZYTm/nQ/X65OAHHO6MXz984OjiuL+huO1PLgqp5 j9xCoGFbDMEdat/j80GxqW5v2b8jLEuXl7uyUI126vk6SJzSeUx/IMg1zY9I1XZ3rzbH94wIyqnLP VRnLUDs+Frjj5EcSVhrCwI2/cadL7dtTB+Wd+sz5OYnSwf0H1RHQ4BWTgg2pOSiYrDxWI5alWTu02 wczHedUoQxqPc5VdrfJ93ZN6lVURSITPLsKK2KC9/iIv2e39GUfx8HGRNKKlCV21Bu4Xb5zmGWbFj FC+UtDxw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1e6shb-0001Az-Qf; Tue, 24 Oct 2017 06:28:39 +0000 Received: from mail-pg0-x243.google.com ([2607:f8b0:400e:c05::243]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1e6say-0004JM-SZ for linux-arm-kernel@lists.infradead.org; Tue, 24 Oct 2017 06:21:53 +0000 Received: by mail-pg0-x243.google.com with SMTP id v78so13712461pgb.5 for ; Mon, 23 Oct 2017 23:21:28 -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=fVNkswW2F9Q2QI2ZTaY0vlW/IrEbCVf8dY1cNKokZF4=; b=UHV7Hfa+CTTYKGAq7S74hXsMBMC9wc4A+IF3psUurs0mELG4np4WVnraFWw+916B5H ZqJ8ine0O/hnWtno6nSDkWok5lpCbQbLEuvwDSrfBa6nPAWpsuXzIDNwzB9y3uBaFsGm 9+YxFw+b5/UrMduzQ718eJk9x+dtsoOMyE230= 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=fVNkswW2F9Q2QI2ZTaY0vlW/IrEbCVf8dY1cNKokZF4=; b=R2SgzmXWL7WLr1AzOYvOaX/Hec5ZPui8uw0PkIWQPdk92JoUJCyb1aNgqKSvD8IqLk csnrHdGYoxyLkYMvcZKVHJ5o8wHbdDfA9PWi1DW4qFYkMXCn7FqgyFDoftmhP7XoAqT9 XvzkZ74HSpPM0Zd/AOuLNhPKnqHgvlaAjWMM+/pk4l/GhTp/I1t1tRd/P4dHyDlZGhjx 8TNWoKctapSxBX3rDrhR6rdrbPKhu4cbXYwnUoTC3pP2dwubPUrqDb8w/Jg7du/d6TuT iYKG9bX7HlN5r93SJ7R3+h9RzOPerQyI7ypWJhcbJar+eqkf+sUfnMWJiLPZNap0PLx9 vqXw== X-Gm-Message-State: AMCzsaVOIf0akSDyQY0juxTCBhcpYJY7anXFmzFvq97G33W7n6lituOG LiDzeqBM00USzY9NZGRyg6KzhA== X-Google-Smtp-Source: ABhQp+RIndR3eV23fIB5vregj0b/pJ7kpUXzQRjk29sV9lb4vhE8szABbMBedhOExmb6Ftp7qyQICA== X-Received: by 10.101.76.6 with SMTP id u6mr13752111pgq.93.1508826088274; Mon, 23 Oct 2017 23:21:28 -0700 (PDT) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id t25sm14836084pfh.67.2017.10.23.23.21.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Oct 2017 23:21:27 -0700 (PDT) From: AKASHI Takahiro To: catalin.marinas@arm.com, will.deacon@arm.com, bauerman@linux.vnet.ibm.com, dhowells@redhat.com, vgoyal@redhat.com, herbert@gondor.apana.org.au, davem@davemloft.net, akpm@linux-foundation.org, mpe@ellerman.id.au, dyoung@redhat.com, bhe@redhat.com, arnd@arndb.de, ard.biesheuvel@linaro.org, julien.thierry@arm.com Subject: [PATCH v6 01/10] include: pe.h: remove message[] from mz header definition Date: Tue, 24 Oct 2017 15:23:45 +0900 Message-Id: <20171024062354.22621-2-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20171024062354.22621-1-takahiro.akashi@linaro.org> References: <20171024062354.22621-1-takahiro.akashi@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171023_232149_477430_E7363F9A X-CRM114-Status: GOOD ( 12.38 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: AKASHI Takahiro , kexec@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP message[] field won't be part of the definition of mz header. This change is crucial for enabling kexec_file_load on arm64 because arm64's "Image" binary, as in PE format, doesn't have any data for it and accordingly the following check in pefile_parse_binary() will fail: chkaddr(cursor, mz->peaddr, sizeof(*pe)); Signed-off-by: AKASHI Takahiro Reviewed-by: Ard Biesheuvel Cc: David Howells Cc: Vivek Goyal Cc: Herbert Xu Cc: David S. Miller --- include/linux/pe.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/pe.h b/include/linux/pe.h index 143ce75be5f0..3482b18a48b5 100644 --- a/include/linux/pe.h +++ b/include/linux/pe.h @@ -166,7 +166,7 @@ struct mz_hdr { uint16_t oem_info; /* oem specific */ uint16_t reserved1[10]; /* reserved */ uint32_t peaddr; /* address of pe header */ - char message[64]; /* message to print */ + char message[]; /* message to print */ }; struct mz_reloc {