From patchwork Fri Sep 15 10:59:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 112711 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp470595qgf; Fri, 15 Sep 2017 03:57:57 -0700 (PDT) X-Received: by 10.99.120.202 with SMTP id t193mr24590947pgc.419.1505473077523; Fri, 15 Sep 2017 03:57:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505473077; cv=none; d=google.com; s=arc-20160816; b=QKtjCPpmdBlhKFBbhTDQe72fLqHR8biTSLKApl7uXvl1dgQC9897o13dl6iD1QS5vQ VI38G4zCIieKqeMfes8yAYvJ4QyzI5WY0ZP2VgK5YkUuhRMQboNXWIMVonROkDtOlK8+ eij1Kv9rDzj6so7JQozEcarZYjq0pI4NJvqJV+DfrKqUlRdPO0ngxhTcQFJRNBvb4itZ 3z4gD6ARJPGssur1gchK/pdGmRa3IziSIL1KM9Fm/TAv1afOUShd1iijW/iCG8sUxIUN 7eLO/J6TFJdO3n8ma49mqWCVRdspIIwElpqGub/ZJg7LdmIO8E3C98aCfP9R8dxVgr9W UXhQ== 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=r6biBf9B9U08WCpZ4waD1aIhuTnlibdMjMMVZN0MeDQ7l5PqQuea5u9DdnLEGNQ70z aP3vbgvlo096S88yWMV+C0Isg2M3AP4ds6HG2VH7Oa8DVj5qlfQ54JWXbJrtCg7kI2Xn 4MCClHO5s4K/OedJHrimlxfMV0CGgCV8ClC5EgPQI1DQ0jihDR/3l2+ldeuEBzny1QHD FUvLULuEkcAvecgzxxKFNQjOaxSNhtrpKjTJcoJlYpmMmlurYPrj4/NcklXs7XVm7yWm 0xIHkbeMOPPy88vIvmvMMXr8FvJr03lblLgP4kBzoO3D61jQ8rUsylvlDiH9KogvHAdA xt1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=h0sn+KNZ; 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 s7si498537plj.763.2017.09.15.03.57.57; Fri, 15 Sep 2017 03:57:57 -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=h0sn+KNZ; 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 S1751414AbdIOK5z (ORCPT + 26 others); Fri, 15 Sep 2017 06:57:55 -0400 Received: from mail-pf0-f181.google.com ([209.85.192.181]:46281 "EHLO mail-pf0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751157AbdIOK5v (ORCPT ); Fri, 15 Sep 2017 06:57:51 -0400 Received: by mail-pf0-f181.google.com with SMTP id e199so1263348pfh.3 for ; Fri, 15 Sep 2017 03:57:51 -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=h0sn+KNZGvkZmuzx8c0pN9cOwI+ykteLsoChxkW00OqD16Qz59pr2Gdsjy/h2cCYgx XvN4vnDWjmek0cvRy8UIu9QA7/rCKmAaKiLCWhqek1fC+LN4/tgVoWZ+bPTJ1VqtYsfU PmXq/7KvqkZdLUxSODNgva48F6PNpUcWagDR4= 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=YU5yreuI60ALhwHi+P8OhJQwmT+q6wZ4S8GuYLF/5QLG+kUlQDwfzDWaf2jKTSHNuQ mZDSUN/aIIDdA8MGxd+GjWX7Lo2eoTIK3a2QqySaOLTsa94981r52IJbWstXBNvo1T5C Hfdccf+kI0oUGhoR1nYfAiAk5VnGscSa/ReIbME4W4ICdqlt0xTW9uPWMre9ARMUSO7p uJC4yhnV+6rduIStgbtaiwNTQhJtMdEqe3/38EtISysVkO6JOGRblnIvyC53o75PdJ5V rMq4ALjgx1vP+fYuAQyUvBib+okfOEe949N4/cZ/mKQDMmgtvVZ2EiaiuQyoNcLGfvSA Bvig== X-Gm-Message-State: AHPjjUisjYtYujapHNK0UVGJdV9GzPtd2HYodmyQpyC8znUNgd+aFLUN HpAmaAXdFTfLla+0 X-Google-Smtp-Source: ADKCNb6ZSRLdRp8unjBKEj//K6I8JyXsI6YFCIkUD+J02E1gkmOtWOYkoa0OszmeNnMRq11Nj2DJxA== X-Received: by 10.98.204.201 with SMTP id j70mr24425741pfk.117.1505473071389; Fri, 15 Sep 2017 03:57:51 -0700 (PDT) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id x19sm2662329pfa.16.2017.09.15.03.57.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Sep 2017 03:57:50 -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 v3 01/10] include: pe.h: remove message[] from mz header definition Date: Fri, 15 Sep 2017 19:59:23 +0900 Message-Id: <20170915105932.25338-2-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170915105932.25338-1-takahiro.akashi@linaro.org> References: <20170915105932.25338-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 {