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: 116890 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp5451437qgn; Mon, 23 Oct 2017 23:21:33 -0700 (PDT) X-Received: by 10.84.191.228 with SMTP id a91mr12206095pld.176.1508826093273; Mon, 23 Oct 2017 23:21:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508826093; cv=none; d=google.com; s=arc-20160816; b=mfL2c3IpXuHoe8P8okBtbC5qD1dIh2QXBl340YBRKH7hQtb1PhCCE6+onSs1+lF5fU /rdlonfi3W7D4Y22Cm7IGHKAaDIaFE8DWQlOrpfmrl3KOHHDFkz0LmB3X3roMninw+6B tVBPb/Srl345wVAHgga5MEUEzU/uWoFEljshNuu8Se+eUf8es25pUtZAUhjaGq/xKOPo LQ2MSjIpiVVyMXr+Djjqk7szvNFzo5Vq2iKQCB2Mqm7ilu/YjNPfkHfasvgFzafs3p7Z Js+E2uokZjPYXx1QU04cKb4r7Wna1xEfJqQyrT0wRj9bhXVFMr5vb2tNZlfkucqvob9E 8QCA== 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=fVNkswW2F9Q2QI2ZTaY0vlW/IrEbCVf8dY1cNKokZF4=; b=q+ScqRinzrqWEJCa+9Qwoyvi4UZAjuKQmB2zEkfC6K22c3T+xENUBcI+fYpiVcrRBC zgAx+SxcKknTVytxBB+vt56IMRIHoG4piog8BhxmCXilQ0It/A9hvjO+03cR+74UQq84 MU3P9Rb/iYm34Wv7yn3f6MxbyrMKijk0T9S+vmYkjrJkGv3w2JA3cYQip5pCwFT1r10O kwiLGfH9RO1M7eSjwCcEBGXIBq8BG9NZp71BSZUM6kof/Zh6saNspFIjlZXbCxTPE7Mr oqhKgm/0q3nFiSpsNu7WD6CFat1JXZ6FRMLv/c5XVyLyHG2FVk/HP9kW1j578A9H5Xnk P6lA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UHV7Hfa+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (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 b23si6522798pfm.307.2017.10.23.23.21.33; Mon, 23 Oct 2017 23:21:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UHV7Hfa+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751707AbdJXGVb (ORCPT + 27 others); Tue, 24 Oct 2017 02:21:31 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:49751 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751645AbdJXGV2 (ORCPT ); Tue, 24 Oct 2017 02:21:28 -0400 Received: by mail-pg0-f68.google.com with SMTP id g6so13719871pgn.6 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=MxkLTMJegII11cePwGOhVGhBofV19aFJGQegQ5VBTzLys3kHtXcZs2o8/oZwnDJJkK di7Wi6yfLSbEzqBUc0LjMBiTwP8xXZYKlEwdtI5AE7TORlb03X6iGl0qrvUKSibenbUm fI6jYuc4UvWhtBpw9mEWdu1b/dzUMkJDQvIGzkhYkVdLwolaPma8pYjnjtI4K3S0ED3y AXhzpalb4LQ6phy4ZqWT5fSYSzc6GGjse2kjy1G7SI8QzseO9YHAfNQfx9xVWJpg6JL0 gKP+AGGnT+He0Vkkeytm5jof2QDxZ0N4/acIotse0g2dl8mALSyRIrY8rIN3eNoV5ouB 4cZw== X-Gm-Message-State: AMCzsaXRCKnv58layeKUpx9iHMYRkX4pnGsODoLktUWnxH8Ijtrc38rQ t3ONrjiY3sPs3atd4GSjgGrYd6+BgqU= 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 Cc: kexec@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, AKASHI Takahiro 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.14.1 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 {