From patchwork Fri Sep 28 06:48:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 147780 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp372057lji; Thu, 27 Sep 2018 23:49:30 -0700 (PDT) X-Google-Smtp-Source: ACcGV602YXeowaKr4FobTiPJSzr+cQscMCZGDDMBTDqw0UHCGIuEtLeyIXuklb6GwvjqMjbH5Suj X-Received: by 2002:a17:902:a9cc:: with SMTP id b12-v6mr14502487plr.198.1538117370023; Thu, 27 Sep 2018 23:49:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538117370; cv=none; d=google.com; s=arc-20160816; b=Dl9xEkXJbnz7Gw6vi+p5UHjp634XPq+TJ+RjLpjq8ilTkmNA5saCwzQ17rOUziyX4f KgHr6qXPLw6L/OAw7wZ+Og1GodeUhk9i3aQOEYkikNCPD6Z55Po+gK4Xlr3aSC+E3ME7 5eDmH3+zWUdAGcECCVP+7XJ7XUIKn/weLCRkKBefZq2bFUqysv8TrYVWR1hGPr6ubICu wXD+ZAuXk2iCHpH/dcsFbNJMlhntN++YqDtO0B/6vqGiquMfWGAc/8+MwelTSNscypqw WznYfJGi081yy04H1KkxQOgs7WhTJOim0GWPHsnVkTq958m5yoF/nY7TnnnEOabxV7G+ 3tpw== 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 k135-v6si4639432pfd.168.2018.09.27.23.49.29; Thu, 27 Sep 2018 23:49:30 -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 S1729211AbeI1NLm (ORCPT + 32 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 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.19.0 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 {