From patchwork Mon Oct 2 06:14:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 9980251 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 020036029B for ; Mon, 2 Oct 2017 06:14:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E80621FF1D for ; Mon, 2 Oct 2017 06:14:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DCCE81FF8F; Mon, 2 Oct 2017 06:14:08 +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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 70BF820007 for ; Mon, 2 Oct 2017 06:14:08 +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=a50ojayvnrMhE6NE8qzkSh5cxpvViz9oTGdCi81eVW8=; b=C+WdisNvmYBOkWZoOXl64SCmS5 saBSwnPDHBeWGzr4frkbmhnkBkRlyAf6xVxecy4t3aiSuaPrJLECmWAHGY6lSMPdvpDFZTzYtzkOE 5xjOndmVrPLqLhVSbKotrDsJS7GPSDHrQvIgr7fNz7vOFE1ellnCWUirS05v8Abqw3JFxliHPY2TM P+BCmMfRuoyFjnTgy23s3inadEeuex8IL9iEZMJ7rMBJodtGQBJb4uj5lD/Xy7NWEW29lofJYXy+6 P6AqmVzjLQmf/jH/c4uOlzOUylx1OW7uFj0wJXx2qBwvlmx9wBdUelWRA47+15CWWnBhFORW4sHG1 NGkWtnwg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dytzQ-0005Y0-HV; Mon, 02 Oct 2017 06:14:04 +0000 Received: from mail-pg0-x22d.google.com ([2607:f8b0:400e:c05::22d]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dytyM-0004rI-98 for linux-arm-kernel@lists.infradead.org; Mon, 02 Oct 2017 06:13:00 +0000 Received: by mail-pg0-x22d.google.com with SMTP id r25so100162pgn.4 for ; Sun, 01 Oct 2017 23:12:38 -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=fVNkswW2F9Q2QI2ZTaY0vlW/IrEbCVf8dY1cNKokZF4=; b=i0j+Q0fDGlInInThkS3PwWG3rUMl6d8rCYq8rbiC9z3NznGuVYqV1wVkcdut6O5OkQ wh/AKuHNr/+dVE6bjkcE1hXYzwN50lvhQ7fp5AMDmy8pEIimy8WJ4OiaVcFPNnMpNH2C GHYKl5Jujf9yZjpfxGr6vFV1GbYF7RxcGE8Gk= 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=fVNkswW2F9Q2QI2ZTaY0vlW/IrEbCVf8dY1cNKokZF4=; b=BrLtW7PsEP2RVfUVzEYjESbGENImwDeMjJBPNch1yoFp88eeF9S7YJVSh5AMZPw5QE oVWTicwWEgC8ikTyoG5Z1Vy+bFgPoazVIU7VwHFy39e01oPArC5PHnx8wmO9DUl6FB9s leNkOn44PDOKFH8MeS+f9x4Yz9jdQrjtkzg9sCrhR1BjNWkOAbC66v2yFQ7VG8O/EoQw WXKE6K7L1DdIDrs49Kz/OG6hmN+ct25uxpyYWc/wMdRahtD5ZqV7hj/Tw5zFfdQk7RbB p5XIK/4jEtvLPPrYv9d4qZaOqoydFEVge1z/NXJSiXBLM3xqjvlNB+QvDneGr/qv+T2b SSkQ== X-Gm-Message-State: AMCzsaWEyJsInV0GBvlm9M6MBM3oGwPMmMa19/35Dn4aycZGRhNZOnqr A7m5/WIkJMCKVUvepncQPi7vsQ== X-Google-Smtp-Source: AOwi7QDP3cX6zeOQfNh34Rp6Cx1W+DI8b3sO9v6APKKyOkVMFQdVKDNf3Flgua6lurD3wehxktoCwg== X-Received: by 10.99.155.26 with SMTP id r26mr6653570pgd.139.1506924757565; Sun, 01 Oct 2017 23:12:37 -0700 (PDT) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id n18sm14684514pgd.69.2017.10.01.23.12.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 01 Oct 2017 23:12:36 -0700 (PDT) From: AKASHI Takahiro To: catalin.marinas@arm.com, will.deacon@arm.com, bauerman@linux.vnet.ibm.com, dhowells@redhat.com, vgoyal@redhat.com, herbert@gondor.apana.org.au, davem@davemloft.net, akpm@linux-foundation.org, mpe@ellerman.id.au, dyoung@redhat.com, bhe@redhat.com, arnd@arndb.de, ard.biesheuvel@linaro.org Subject: [PATCH v4 01/10] include: pe.h: remove message[] from mz header definition Date: Mon, 2 Oct 2017 15:14:22 +0900 Message-Id: <20171002061431.11117-2-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20171002061431.11117-1-takahiro.akashi@linaro.org> References: <20171002061431.11117-1-takahiro.akashi@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171001_231258_373689_FF1590FA X-CRM114-Status: GOOD ( 12.14 ) 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: AKASHI Takahiro , kexec@lists.infradead.org, linux-kernel@vger.kernel.org, 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 {