From patchwork Wed Aug 1 07:58:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 10551809 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0C3A0157D for ; Wed, 1 Aug 2018 08:02:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F1323285E1 for ; Wed, 1 Aug 2018 08:02:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E1521285FD; Wed, 1 Aug 2018 08:02:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3E5A5285E1 for ; Wed, 1 Aug 2018 08:02:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=31FO+3YWw+lbgK7CbqFVgxHXdp66iMzrGJV9CRXr2OM=; b=JmNrMK5I44JbPj29EPuIPBH6FW pLAMtCH9fg1pe3jnfg6TemrYBJZvmNgdLnbO0y+bUV/04byTFy9ivbFlBJCvYGK1CMdDfSqlKUdaQ DEcIX/rHPhNT941m0dngV8Lr20sHNvQ3XlmLZ0MYzQu3Hapbq3lKf91Dja6MQdJBfTtZG4bdmsqdB nyiwcDn05noE3Ky4X46Ua6PYsiiEiKcAeUSKbm8/Mi/Irvblyn7ny/FSDIcHbR2KI0tDRAENvppFF 1LZgsquIs3i6URtBeNBMx2Vj5Kalcvx7R1bXZfcrcOQVD6YCD+PrZtsXYBtOoumY2wznEZbACyPmL ScngbtwQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fkm5f-00071u-1T; Wed, 01 Aug 2018 08:02:39 +0000 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fkm4d-0005ay-8Q for linux-arm-kernel@lists.infradead.org; Wed, 01 Aug 2018 08:01:45 +0000 Received: by mail-pf1-x443.google.com with SMTP id d4-v6so7206379pfn.0 for ; Wed, 01 Aug 2018 01:01:24 -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=H8r9Y6sXiWjrMnoHACDZ61CdzVHsVLeFpn0oOZb/59I=; b=ZLy7xhwVoIk2JGm9se9fVuenhAyqRTXpFLb3RWBSFKDbrsdyjwlSdoj3/mNPxXm3Pp ParJ6WCLkg44t7OIzVyYXHtfPrCIvmj6Dy+8H27lKfdaa9VMlXMX3zv7sJcs5eOzE1ip UCnt9sSLtloaO862KDPWAqGU33k02X9kuCryM= 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=H8r9Y6sXiWjrMnoHACDZ61CdzVHsVLeFpn0oOZb/59I=; b=N/L1BCuu06WGo1BOLdosGY3pB0r6b2PVVHyLPP5CZATLHL4nRmSkV3nETIxKyAVx8W v/1pHD1Jl6jT48nHIJhTrBxXoh20Kp90INltGU+6K44L0SBmJqfrb/OsQJmS2Qh4ID+J FfTFfivz7aV6PQa/mCZ5lVStRQds+8BJMedey4JebuExpUo4mFudADM9PYVOeXODajmK guYNChG0xqWLhltS3gBFyFYQqdT68CAiqyfwZrWv64sFR2+FHZ5FLTKW1F5b183aF/yB GNk5aMWY9AGhzVCV7wvOHfuz95UIVZJVSmzUYd7V14cp/yD4OTdtqFkeDQ15tpJyIZVW OCGA== X-Gm-Message-State: AOUpUlGOIDtlLXlrJGcrG7gmIYIOxh3awPYT7NSR7HbCqVOSiEtv9tT+ fCCfNKIWlpPdeqIpw4mnmwgdsQ== X-Google-Smtp-Source: AAOMgpf5JZcnlp+RA9WoHn/IsSQXJ+MkIZi37U3PnMaIOum257RI6Al2wgE8ddTOqBn+jXl7x5cKww== X-Received: by 2002:a63:c00b:: with SMTP id h11-v6mr23123341pgg.279.1533110484291; Wed, 01 Aug 2018 01:01:24 -0700 (PDT) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id h24-v6sm12255971pgj.10.2018.08.01.01.01.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Aug 2018 01:01:23 -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 Subject: [PATCH v13 14/16] include: pe.h: remove message[] from mz header definition Date: Wed, 1 Aug 2018 16:58:18 +0900 Message-Id: <20180801075820.3753-15-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180801075820.3753-1-takahiro.akashi@linaro.org> References: <20180801075820.3753-1-takahiro.akashi@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180801_010136_030002_23FFB8F2 X-CRM114-Status: GOOD ( 14.88 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ard.biesheuvel@linaro.org, bhsharma@redhat.com, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, prudo@linux.ibm.com, AKASHI Takahiro , james.morse@arm.com, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 {