From patchwork Wed Apr 25 06:26:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 134231 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp471204lji; Tue, 24 Apr 2018 23:27:37 -0700 (PDT) X-Google-Smtp-Source: AIpwx49s9F5vQS4oioP9LqXqmImZXF8xvgj2hp8swik+zoQon7icLJ10bhpkqvItWdbIM8uWGdIR X-Received: by 10.99.95.5 with SMTP id t5mr22309503pgb.165.1524637657645; Tue, 24 Apr 2018 23:27:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524637657; cv=none; d=google.com; s=arc-20160816; b=oKQSsqTe8hhohtGYfaXYBbhP/sBVsOxDhym8NGF7sNZEt1NW4K84KSQvIffk6wuUDq 2xwM4d4JvQsOjus6gC9OgMS34GqpPGp4JPcp3/j59ahL3r8CHMxvVFXtCDENdpU9edLg +OgEGsJUyvYsgmbA1mrui4zULoQvyVKOKYNEtv3cPQWcnueKVNKdmU8KR6ofSIfTg/3n 8CSv3fnDAB7aE807oeHfMa9pPMOi5xEhPEqgN+beCgQYpmaP+BPeP0XJ16NMPJKPaQ8E q2985f75f9+Xh6T3Nl3Bo7zlqJoDP0y5BMFXjrlG8JmYpsctuJ+JoBwzZ1IDwXIpwS7q ic2Q== 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=udBD3FA/hkAWhAoznOJdhSIXwaGNnm+w3oMPbyzv9VI=; b=ni2AfJwOR6Vsoh1+jxSbWm4Z4yl5BKl40SF9Bs+xjdzfwbQv3jsiWC4ryw19kDRZP/ VB6FX2Mti2KBJzuGjBhjS7KF0p7djNDw0y/d9skNHi1n9hDi7OMgExmvJl6Ct3WZLuNz PTlXjU4OcTE4adu5EJ6CzTeUzC9/V6+ZkgFo5q+2a+vHBX+5SC3OQQjtstzdT4tTp9Uy vWcb65Cze1BJd1teyJ4H2Jq+gW+bXuS3Y+gXVRPiWk4OpB6r1nDZAruM3yJ9wFgZ4FWk yL2mi4+F78s5gP1DUbXLcc1mJ4ALu9GguXTd+NAPc2ElhlhL/tcfYex7vvQwt/KKp3ik rRVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IG7WVibC; 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 z73si10300366pfj.197.2018.04.24.23.27.37; Tue, 24 Apr 2018 23:27:37 -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=IG7WVibC; 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 S1751613AbeDYG1f (ORCPT + 29 others); Wed, 25 Apr 2018 02:27:35 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:47079 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751538AbeDYG12 (ORCPT ); Wed, 25 Apr 2018 02:27:28 -0400 Received: by mail-pg0-f68.google.com with SMTP id t12so12597445pgp.13 for ; Tue, 24 Apr 2018 23:27: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; bh=udBD3FA/hkAWhAoznOJdhSIXwaGNnm+w3oMPbyzv9VI=; b=IG7WVibC5KlgGNyjs5gTa0yNZCRx4QUZwwlgWyQkog+NJUtizsNhBwt+5DNtpj4+Mo JcMQZ8hwmgN3V7WDKLYmInlox37BmD3mu+702dtnR1KWw3S8EvuUhfeKeXcRJA9NeW+1 d5HLdmW5JG8La/LHfVO7t6U4ACKeJ0Tn5DUOA= 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=udBD3FA/hkAWhAoznOJdhSIXwaGNnm+w3oMPbyzv9VI=; b=BazxacZef/Mi2IYG0NgDX6iivM6uXTxm+zGFdd7W0z/Gooh/9CSVGHYisZf2aWVvuG EdLV8NnhESByIZdiIbk+sDH0KPKVGXTSBZHF/q3KBMHVI/dCiRsaQEkrz4ShujJZLsY5 WR7dGpeL5CrN09zwWgj8BknT0fJt4T8UyL6lWl8uTi8sXC+NzmwwLXGT6rAoepej0Pyc 6jFyNqYfAfiGR63/oXUnGpq7c0E3AYXeiz/wy+8ouDjUazpO7VHBCmpnrx6zG60X+neA Vgbsoq1dDktxQ6OCPrX453k/EVylgWibXAqwpQRB6VFDz2uXqZN/ff08CW+NsavhI2wG oY+A== X-Gm-Message-State: ALQs6tBpn7xuZwNATcPiqH8qn4orFOYcDEV0XKNU4vBSuFqOc9mW4mS6 IWzK+YIzLmaTWVhqgo6yFas5iA== X-Received: by 2002:a17:902:ba94:: with SMTP id k20-v6mr28065427pls.193.1524637647594; Tue, 24 Apr 2018 23:27:27 -0700 (PDT) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id w134sm33993496pfd.132.2018.04.24.23.27.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Apr 2018 23:27:27 -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 Cc: 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 v9 09/11] include: pe.h: remove message[] from mz header definition Date: Wed, 25 Apr 2018 15:26:27 +0900 Message-Id: <20180425062629.29404-10-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180425062629.29404-1-takahiro.akashi@linaro.org> References: <20180425062629.29404-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.17.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 {