From patchwork Fri Sep 7 08:00:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 10591875 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 815D65A4 for ; Fri, 7 Sep 2018 08:16:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 70C1028825 for ; Fri, 7 Sep 2018 08:16:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 62A4F2A651; Fri, 7 Sep 2018 08:16: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,RCVD_IN_DNSWL_NONE 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 C20D428825 for ; Fri, 7 Sep 2018 08:16: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=31FO+3YWw+lbgK7CbqFVgxHXdp66iMzrGJV9CRXr2OM=; b=hY28DkzKGjurpFtaYHiUaOXtAF sfmfYfSgcqfU08p0qc/RnEw2iboa+EvVc/MEW6fAn8FIUTfJYOJTJo+Q32mjEyQrNlAOx/f2bQhDN ewoYfA9oeWfUGCNljvG7opEKJDSPMpGqC1lud7M1P5p8X075HRcZx45vvNBxW9qNkgbY6WcfAfLaC tb/kcjp0NOTBTFwGoqkuzrUdI56hRi+A1u3t2gC6O1e0ecGxu1Z/pEn68HuiL6Ciy4njpRAHagbCL WAWSQ7+qq2Toe9U2lex8ycDqUSfQrnCdFUNCIex/LIw8mOdoXVp2KWc2ckj4aeVpNpkIWeMEI8nh9 4mx/6yXg==; 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 1fyBwS-00046m-Qm; Fri, 07 Sep 2018 08:16:36 +0000 Received: from mail-pl1-f196.google.com ([209.85.214.196]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fyBj4-0003Hq-Ql for linux-arm-kernel@lists.infradead.org; Fri, 07 Sep 2018 08:02:53 +0000 Received: by mail-pl1-f196.google.com with SMTP id u11-v6so6232168plq.5 for ; Fri, 07 Sep 2018 01:02:36 -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=JyzLWOrGqoQh8eFOMBUNRAUWVulDA6drih+fd8GjQIsmU3ep50Kcg2+k/Rp0wT1lc6 BwOLxrjdARBYQomVgaLzINl3jX/PhP8dso+o2a48YgTRkjUXOIfC7geUiJ8XDSjYfczY byVv4TTS5c6khfV1Lohapgo9TJ8wzjfsKZ4mE= 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=YdJTUqiGGOiXEG3PNWwFMSgO/ECfKztRMuYClZCZzaPtSTF2VOgxaolJlGRregrAKz BNvdPry9dHDu9/Fd6JiRdwOyPpQMDXWoIy0+O0V1FSX75X+9giOFVKUFK2Cx0CFmorcZ 5jrbOG3Wodjh/JRNrfFzdz4nUNGeY7K3SNuWT0dJ98OIbo0K+dh7//pf2rlVYGK7ZRMR fm8uHxabSCsErAfNIqYCL+ccIOrphiOsz4TGDfqcn0FVbY+pIugaGJdvGJJYb56uMjDS amTEZi/iiMrswZ9uO9yykcrPOYSF0p51NxAF7z2YkQBWO1jCUdeGtz5gY4Bj+1bMRjXq RQkQ== X-Gm-Message-State: APzg51AgdcUEsAY14wKNTgSqTtbqVnmbHO2HKLbPRTpMGsUUnTCOb7vS rx3SDIW0o3nabsOarCuZjfi04Q== X-Google-Smtp-Source: ANB0VdZFg50Kt25YW660rtBie1bJyJfVIA7pQFzqusIqxeZeKzbgjgKArmCDyC03/n1E+QIoHbBeGA== X-Received: by 2002:a17:902:c6:: with SMTP id a64-v6mr6713497pla.180.1536307296340; Fri, 07 Sep 2018 01:01:36 -0700 (PDT) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id b14-v6sm10811236pfc.178.2018.09.07.01.01.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Sep 2018 01:01:35 -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 v14 14/16] include: pe.h: remove message[] from mz header definition Date: Fri, 7 Sep 2018 17:00:38 +0900 Message-Id: <20180907080040.4967-9-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180907080040.4967-1-takahiro.akashi@linaro.org> References: <20180907080040.4967-1-takahiro.akashi@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180907_010246_860911_32309510 X-CRM114-Status: GOOD ( 14.53 ) 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 {