From patchwork Mon Oct 2 06:14:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 114547 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp325458qgn; Sun, 1 Oct 2017 23:12:42 -0700 (PDT) X-Received: by 10.99.121.141 with SMTP id u135mr11382458pgc.86.1506924762259; Sun, 01 Oct 2017 23:12:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506924762; cv=none; d=google.com; s=arc-20160816; b=fF7oRlKq2+vRYSm+58gQeP6kzDr29iOt+Go9BbyQHouCBgZgKAJeMzfWJSHflni7nQ C2MfWvy5yBifYicSIgv18UF8Zrg6zhXfjLAezjjpWBcWk6jWXYtMV6A41bJrrfkY170V KI7chqMXAhkNsT29ixSjAOfMSe06jyjCU62eQP2i8/tHjCE5kaM0Lo1YogO8x0Uf3J4X ROiww8omjO7+geyyozjoGxJLqoX4/2vlfPTBtfwolAb2JryYL6OQyo3+3U1fCI89XcVO Bz7Y8pvWgM8Savj628X1ILiGqzsxHkTVNWqTjYN+Oh1epBtNO60thlGhxf9B4rIJxz5U Pt9A== 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=Si48br/njLRrOHvtLsFBAUUGghr1ik95Z4op9Bk5jtVtjK8DBbtO70tqOHx28bUO0F wzaWEqj20gzSRsMCC/4eMjm/a7GBQNi21Uj6Jcsh1ycGtBXW1AKrdyeVVeUOxQh5KaiB EoYwCEgblUoozpJC0lOFKTYPl0yHIntvNh14tSF0XK4FQeoqIsbt+QfE7i1sLBeEHB1Q VQezTYqlZgac9fa2AcZyMag6COa8vgYLntEMLcPXuJgKfRVxtMP+zN8LRwyq6hXCT/7Y F6ObRePXO3qFreVAn4vFWawrUo8oXggjrFa7462Ixk45inHibSsZ/fzYejYdmtmKstC+ 21tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=i0j+Q0fD; 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 11si7189782pfl.365.2017.10.01.23.12.42; Sun, 01 Oct 2017 23:12:42 -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=i0j+Q0fD; 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 S1751075AbdJBGMk (ORCPT + 26 others); Mon, 2 Oct 2017 02:12:40 -0400 Received: from mail-pg0-f51.google.com ([74.125.83.51]:57059 "EHLO mail-pg0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750949AbdJBGMi (ORCPT ); Mon, 2 Oct 2017 02:12:38 -0400 Received: by mail-pg0-f51.google.com with SMTP id n1so1790690pgt.13 for ; Sun, 01 Oct 2017 23:12:37 -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=i0j+Q0fDGlInInThkS3PwWG3rUMl6d8rCYq8rbiC9z3NznGuVYqV1wVkcdut6O5OkQ wh/AKuHNr/+dVE6bjkcE1hXYzwN50lvhQ7fp5AMDmy8pEIimy8WJ4OiaVcFPNnMpNH2C GHYKl5Jujf9yZjpfxGr6vFV1GbYF7RxcGE8Gk= 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=C43IN+TLUvH82lWWHMkiOPa1JuNJWt8m9NhgcrJ4HfsywcZHyZg9pXc6vB3y0/t/xx STTfK8PgsFBXZCZJZQQqXOGRRDVxBkDCFlFI+imJjjjVxO38Lu0rEgxE7WN6/oELJZOl 8igJvBg2kqAoXcGjPae0Tj6oNmHPS+9N4pUv07UrD53QW5dpbDkRIXaxEQk0azFJQMp0 gr9gFyvxzTu9FREPL9p9bExUt7V33Qffk7A86zokJdGc30fbv2b5FhMC6ugxiq3OhGVR B6d/Lqi6sYxo+KGELJAFrWI0w333W2tSMREIqCzivF4j1YtWFB9aK0Qj+owhJj0g9qNj Z4mg== X-Gm-Message-State: AMCzsaXQK80Ib5N0D37b6yXrvA/IkpkYjngNo9wU87DQpiBIyKfzzyk3 gTX3raJiG5dJrl//iCzTnLzG3A== X-Google-Smtp-Source: AOwi7QDP3cX6zeOQfNh34Rp6Cx1W+DI8b3sO9v6APKKyOkVMFQdVKDNf3Flgua6lurD3wehxktoCwg== X-Received: by 10.99.155.26 with SMTP id r26mr6653570pgd.139.1506924757565; Sun, 01 Oct 2017 23:12:37 -0700 (PDT) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id n18sm14684514pgd.69.2017.10.01.23.12.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 01 Oct 2017 23:12:36 -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 Cc: kexec@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, AKASHI Takahiro Subject: [PATCH v4 01/10] include: pe.h: remove message[] from mz header definition Date: Mon, 2 Oct 2017 15:14:22 +0900 Message-Id: <20171002061431.11117-2-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20171002061431.11117-1-takahiro.akashi@linaro.org> References: <20171002061431.11117-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 {