Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp395727imm; Thu, 27 Sep 2018 23:50:18 -0700 (PDT) X-Google-Smtp-Source: ACcGV60ymwEKqDjY91+BG5/dzfR+YgAEn0VlVOtCG0WTM5OsE0NY4JoxC+d6UFkSbwjLzy7hiF0j X-Received: by 2002:a17:902:8bc4:: with SMTP id r4-v6mr14275037plo.124.1538117418737; Thu, 27 Sep 2018 23:50:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538117418; cv=none; d=google.com; s=arc-20160816; b=G090UviMfgG9VNR6O44CdZfW+q2dnOoXs8iVE1FPkOUCRG6s11cxxvZiStzxrpc833 bcovqLo+ZYLBpHiygTc5r8mflpylnmjah5YbkT9ACJqrGKr9S/OYj5yl5/vyjb7JkHkb MrDOh750i4xnjYBz0NY3lthFG76t1BKt5coBwhc9LcMCDRmZjiJHkClOQlmwupxFnDpu rJoMg6o0AMmU9sxlWF7UVg4zWKy+OKnOKQie1XuQDAj3qtO4Lp7L1DA5kfa/WZYgckxh +s60xf1wnsatJcRQ+pEqeLooB/aC8IcSEj7Hg/JnWGrwoKHzw1ao7SMoobsqppdlM61W LbTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=IBZa+UOaDV8TYfXAr244/shDNprkQTt1AVYjh0q1zSg=; b=f+Yb6JoI82pi84kpvF1m6oCsnxzbbg5jm+6m9ndGsyn2W7H4ZZymWZHzMXdjIWz4xh 8YXCK15J9GfUgeJ/98TqN/PlFtLMpObCbCxakAUHg+oW6kUkZF6C8rP0FPHnB1IXGjfb 2x/JvTwxT+Y/pUOXDcDaVBjkTV4U5oxS03pxYAnhny7DoDa43GwUF/ZNFjhnmzD+rZj+ Oig95c+Erq07nmHYWvL+fKt2GfpcgdgSOB3o9INraFLhNpR7DRq395IgSFbGSp5AhWTJ Uf9i+ldVYBmsIT4jCV5G49KAuZUdOZvDndJQLuIhGYMm66VjlCShpElh05RJ73uNr3IR Pyog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Mh2bCx/Z"; 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 s125-v6si4092327pfb.335.2018.09.27.23.50.02; Thu, 27 Sep 2018 23:50:18 -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="Mh2bCx/Z"; 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 S1729205AbeI1NLm (ORCPT + 99 others); Fri, 28 Sep 2018 09:11:42 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:35610 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728765AbeI1NLm (ORCPT ); Fri, 28 Sep 2018 09:11:42 -0400 Received: by mail-pg1-f196.google.com with SMTP id v133-v6so3746627pgb.2 for ; Thu, 27 Sep 2018 23:49:27 -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 :mime-version:content-transfer-encoding; bh=IBZa+UOaDV8TYfXAr244/shDNprkQTt1AVYjh0q1zSg=; b=Mh2bCx/ZN4Zr/xQdf+Ij2U350YGbZV2r17bFphhhLYuMo7nTEzXYoI8KgK05BStuHg 29FRhfAGp7d3b3cqtE3ewpnaKTCMcgMRrwEW56yUxea7nyOgJ6HWQkIjIbR61Ef6imOo yDiAjpO0CKf4ZkwsS5kiFcYyNa0dYA9L6lr/8= 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:mime-version:content-transfer-encoding; bh=IBZa+UOaDV8TYfXAr244/shDNprkQTt1AVYjh0q1zSg=; b=MvwGo6IImuVFVGZ+tyexgH+TD8SNGWXylHjSLYg19daLPSngHxNcKKZOL2NDLEB4tN P092PACUEWD+7n7UtFxTdfGq8glOmHn6OvGouWq5dcPw4xo6znzZ83Hcf9ieDi4Iv1lC E7hCEv7XhNv8sXi6DD+HS9AS29A/1hX8GNUsoiYFOq/VkguWk69wuBrCRah0p3epwKq9 0uYBiNnN82fZgQHA3nFyE9PObZZZmeEE2V9q62HNWT8vVt5dTkdau4noWtQYnOdYt9mV 4nNH1TSbXLi+tUt/J10QGktOq/O38zAyvqyogdwOKvmnV/FEh/uq1iEWhb2u4hmBtA1K QyUQ== X-Gm-Message-State: ABuFfoi1oNCj/TvwlNZuDYSDxFQ2Dsq7Ap4TQ/ep0EAiEhz1OyyLKfhf tNYKwgI8nBVbaIHU8WNFzoiFXg== X-Received: by 2002:a63:29c6:: with SMTP id p189-v6mr5419584pgp.188.1538117366876; Thu, 27 Sep 2018 23:49:26 -0700 (PDT) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id y128-v6sm5938994pfb.56.2018.09.27.23.49.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Sep 2018 23:49:25 -0700 (PDT) From: AKASHI Takahiro To: catalin.marinas@arm.com, will.deacon@arm.com, dhowells@redhat.com, vgoyal@redhat.com, herbert@gondor.apana.org.au, davem@davemloft.net, dyoung@redhat.com, bhe@redhat.com, arnd@arndb.de, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com Cc: prudo@linux.ibm.com, ard.biesheuvel@linaro.org, james.morse@arm.com, bhsharma@redhat.com, kexec@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, AKASHI Takahiro Subject: [PATCH v15 14/16] include: pe.h: remove message[] from mz header definition Date: Fri, 28 Sep 2018 15:48:39 +0900 Message-Id: <20180928064841.14117-15-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180928064841.14117-1-takahiro.akashi@linaro.org> References: <20180928064841.14117-1-takahiro.akashi@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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(-) 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 { -- 2.19.0