From patchwork Wed Jul 11 07:42:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 10519087 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DB20A6032A for ; Wed, 11 Jul 2018 07:58:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CD1B4289FB for ; Wed, 11 Jul 2018 07:58:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C136B28A0C; Wed, 11 Jul 2018 07:58:44 +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 5F1E8289FB for ; Wed, 11 Jul 2018 07:58:44 +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=eL5nHWLjr29NDY6dw08bqQPo4HpzaeiDfqPh0JNfvh0=; b=eDP9yYp/5cp4TvNjHmRNjuy9MO 7B2Ab1ipqYNIFgPMx9bx32vJFHd63hq+OzqURC0SzaNCNMCfih25maob75cLPKq2JOAuOZibH87vy D6W4tdvsIbZOsXRrSDcj06T3w10SaHJVT44L7CvicqnB7jXSJWy7LKA/GNE4SGC1qHI6fQZihgAx0 F1q60KfigONVbieZuF0miiP9fWz1HMDxZhbFXBhzNfWc283RXyXYHWmuoFVRHJQwrpDF1HPZ+xlSr bq5FBn4eVOfjmCDBOx4ozoJXoAaPCePP93ImZYVPEn6WdMphfOCB85TarJ4j/7dkQCzYgiTNPNogP M8MgO3/Q==; 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 1fdA1G-00070s-2q; Wed, 11 Jul 2018 07:58:38 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fdA1A-0006Dd-2L for linux-arm-kernel@bombadil.infradead.org; Wed, 11 Jul 2018 07:58:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=udBD3FA/hkAWhAoznOJdhSIXwaGNnm+w3oMPbyzv9VI=; b=TVV06uEpJ3ALKhJyHtDsjDQmc EmKydAwleQ1zvn5uPjcotXSUt5fFBK7LBJTtqjREj2TybwuYsMUA1PqmIw/p3ygjPr5QprXmHHiJ6 gAsJ7fnnrBlNlLFJ9aiQ5MZnlS7cQCbSLV6U/4ri9b+M4h8UubbeUfysHpJXHsWPXCtQzAAqMNRcM iQoNJ3S4QiFYHQ1LYYoeLtAZE4QGrImTqvq8BUWDe26K5dvJc1SZ+EfkS/8i7eoVLCVohz3MIxhzz bZCwgLN00J7g29OluLUtucpm4iBH2o4Wwu0Zz55it2r1AoTZdvaGal1UvGLaOUhZUYtqqNEKKAGwu ZKEYAzUxw==; Received: from mail-pl0-x243.google.com ([2607:f8b0:400e:c01::243]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fd9mX-0005Gd-OI for linux-arm-kernel@lists.infradead.org; Wed, 11 Jul 2018 07:43:28 +0000 Received: by mail-pl0-x243.google.com with SMTP id 31-v6so8801807plc.4 for ; Wed, 11 Jul 2018 00:43:15 -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=DDS3bvvNhkJvcyqdwc1EFKAG41UgqJWBEUWNzUomCGlSVBYybxbPWOYB6U/HJkrtI+ JO922kw8K9fFwwQ7Xx4GUuIiEBLkFOp97E/qUZUTrMLS2ZvIya6FSNsz3wkun19dQeD2 7ktTYhWtLCQlRYy6zi3kfQtakAzPYqwr24TQA= 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=o5s9RtLMhEugmmoIIRSn6HwzntcJ3udVFypUK8MqYV6G7eIxMN284Hj1EEIus1U33P Q2FjtvdTbP95cuzzns5JtNGm6MVrWe6UeIrLCe7gGjV2SoQSLM2aS7Dbq9cGP99uvRTf Upc0NIfdtWYv0c1hp/VlSTcc3iurlU3cZhcJXOkym/18zVBH+H9i0uh/e8b3wtHfoQ1W W2myEs/KyVXg4MkYTXe6YFM43h1KG8gpPhJRURmFKmadfnBkr8ziyN7+p3GqaVS++fwU Pc2Fkaj3Rkg/gpVYuovbIIyV97nMPY6QWd6+oSVACwjIx4ndFwo7wglqLujhsySUuRTt mCNw== X-Gm-Message-State: APt69E0cMzs75eCN5ze5tjmPdUM1MP/QT5DCO8kpVNrxEgHyK58LA7TB fsL72/kylSXFP5kAyNwns6hMjg== X-Google-Smtp-Source: AAOMgpcIiQzkNN2sPH73iGSzD9wIJCjaSX4E2S5JJt7vzPU+eHD3xPGyLijloMkOKU5fK4NLVv7V3A== X-Received: by 2002:a17:902:8ecb:: with SMTP id x11-v6mr28387294plo.308.1531294994256; Wed, 11 Jul 2018 00:43:14 -0700 (PDT) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id m86-v6sm40464859pfi.47.2018.07.11.00.43.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Jul 2018 00:43:13 -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 Subject: [PATCH v11 13/15] include: pe.h: remove message[] from mz header definition Date: Wed, 11 Jul 2018 16:42:01 +0900 Message-Id: <20180711074203.3019-14-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180711074203.3019-1-takahiro.akashi@linaro.org> References: <20180711074203.3019-1-takahiro.akashi@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180711_084325_787618_9B72F381 X-CRM114-Status: GOOD ( 16.62 ) 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, 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 {