From patchwork Thu Feb 22 11:17:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 129215 Delivered-To: patch@linaro.org Received: by 10.80.172.228 with SMTP id x91csp1881347edc; Thu, 22 Feb 2018 03:20:33 -0800 (PST) X-Google-Smtp-Source: AH8x226DIluONmUkL0LB2Del+Tr+Y3uNGdqL/sF0Fk1XiqyWaWwj4AA5YQ2M8Kez8IlH1kdt8FlC X-Received: by 10.98.61.133 with SMTP id x5mr3602188pfj.181.1519298433403; Thu, 22 Feb 2018 03:20:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519298433; cv=none; d=google.com; s=arc-20160816; b=olZErqb7y9NnNj14FjvFtX8QCpa/M9WjcvfhRuDwsTZH5hD1be29ogrr/2x15sXipn U8yyhHyiouIbOXV8zbW4laMpRaWcnsyS9KkqRr1WlUjY3yHXTXkXqYpPkHKHwohpmeIj ed/ZT0C2kBIs5FHaIkcnYJBadBAbBYfeUcJsfmZrVZRsKl1+deYklOwSIwupnA2MhEjY ytrljEC88Ntoi5vEt8SWkIpdx/P9qJuD5yVEa+r17PdjHFSnSXuxUmtTJCZ19irP8kuz 6aktrPMCm4W5T/VThBiiMswjxppYo9RpgGthxXKPJBuvxfkiUOr8NRk8vnDIxEu7ftIs 1+kA== 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=uaS4aTMgyvhoEwZbjgAZtndudIYAMy0APlmirhXzKaU=; b=T6vLzcMJjXLhZwXDSLdPAPtMx41lR/JW058nyeiV+rD4wxi7LSOFknn2KTwti9ZKk2 dp/VmSNkyLgNjxZ+7HKDoTm+GPky2xZjzaaostLrXaZCoiS03I27asaYtW1loSXak0YV /4dCJ60bnM6/yFchqIcfFrXAIVC14nCU93Aedbya5Mnaa8wed9i5wwI6ilL8iBVmCyHn kYBgvQylG3H9BjwT76FQ4LAu5wqHkGIFKCByIT64fa51Y3CkF3FqdPpxZDM2iWFp+qba sA56YIaVk61TNQdnazOKRzzwqbUaaeXhAGa3AQpNCXRuZbpIwzG0CECmjvr9kjy/7pn9 vJLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YnifjGKt; 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 k8si64866pgc.472.2018.02.22.03.20.33; Thu, 22 Feb 2018 03:20:33 -0800 (PST) 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=YnifjGKt; 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 S932260AbeBVLU3 (ORCPT + 28 others); Thu, 22 Feb 2018 06:20:29 -0500 Received: from mail-io0-f196.google.com ([209.85.223.196]:41310 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753633AbeBVLT7 (ORCPT ); Thu, 22 Feb 2018 06:19:59 -0500 Received: by mail-io0-f196.google.com with SMTP id e4so5617578iob.8 for ; Thu, 22 Feb 2018 03:19:59 -0800 (PST) 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=uaS4aTMgyvhoEwZbjgAZtndudIYAMy0APlmirhXzKaU=; b=YnifjGKtLe2c6uw8HD5Z9CrTs3OG4pdc8LQJp6MkHgrXt/d5hd/IARei5/ETlWlxce meuuZgosjy9HQsWJRVU68u7ZqmS9lC08N1SO2XbEVh612igyvh2s+DYmEco9rY7X6/HE QzrrcoEGthS4kWj6MetR0fmaP2htb9W4sTWbM= 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=uaS4aTMgyvhoEwZbjgAZtndudIYAMy0APlmirhXzKaU=; b=LM9wd2Ft5w9qZKOu9aJY6GhHGjJ3uMmlJ/zGiXk+Fc9PGNmO/s8U6e2L6mcffEKW2T vKx2D6eDL7vWGnVcwK+D/8byGVICa532wzYJKu95QDuSreH5Zy1AnfZR0BlId7MZOt8H HAdKEMC6kqmbmh5JHJ8+mmr60Wp5WL9GpFiBMBuUoT0DAtr5nHRG7lDyONhtPlOyUZGH BlK+wiDI7x3s3hn6qea3jVp6IeXyeLLCMZO8jkaUILKdBM+IqTr3bghHFn5zEol5Lo7g eeI3MgzRhU94hyRxQ9LwIzJhDKn8Zix1N/e970S95gJcSp2h8DZ9d49cexbav+Hnp0qa UF3w== X-Gm-Message-State: APf1xPCo7kgGveBiBLT1+RhoHfe5u8lq8jblaXQHZftPe20zH0FSWbOg dgv8NLcqhbyLHCE13/uVxlTb3g== X-Received: by 10.107.139.77 with SMTP id n74mr8275896iod.109.1519298398857; Thu, 22 Feb 2018 03:19:58 -0800 (PST) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id x72sm218804ite.26.2018.02.22.03.19.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Feb 2018 03:19:58 -0800 (PST) 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 v8 12/13] include: pe.h: remove message[] from mz header definition Date: Thu, 22 Feb 2018 20:17:31 +0900 Message-Id: <20180222111732.23051-13-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180222111732.23051-1-takahiro.akashi@linaro.org> References: <20180222111732.23051-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.16.2 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 {