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: 146203 Delivered-To: patch@linaro.org Received: by 2002:a50:c01b:0:0:0:0:0 with SMTP id r27-v6csp1458278edb; Fri, 7 Sep 2018 01:01:39 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZyH3rlB/6wT8GYj36YY2l1ZOdPzTTy/8APz81hW4L+Y7Ju7KaQCaqkiQ29nwMhefvLh+2r X-Received: by 2002:a63:906:: with SMTP id 6-v6mr5521526pgj.92.1536307299023; Fri, 07 Sep 2018 01:01:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536307299; cv=none; d=google.com; s=arc-20160816; b=M4rYpGLhxBmNoxz5y2z5z7Wqssly77SvK6onlk2GK+F/ysmXxtS+w8QzdgYT3mJa0H ECNcY+B37F4+aXB/w349LRme9j1DGmQkhs40cbLvoF/kIbctoDk2A2HujQe7qYdYCGd6 9fN3Apze/W9axz+xld+NvjxkC0L6jAxIunP1yh47aN6wXoDdCrhUi9G3Ajw64cUC+3MP MAoeoAeTEbU6QYxAQFTFNU0IWB5zPIP/AGLpnYJaryQPt/KS9irPGwUDJqfMIZiReOao 0VTt7kgC6CATJ3TxXYyfmPQl7QIQeuh22Qj6lj12woHC1OFcSI91y4Ud6D55nFN4CjXJ Tc7g== 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; bh=H8r9Y6sXiWjrMnoHACDZ61CdzVHsVLeFpn0oOZb/59I=; b=z+9iax5nRgpxmhMpMrufwwasY7jq9mg+mT1TnoUYuwPKjLhysjHeucgwCsmhjYKMdj TlHfauvvmnfaWzgBe9vZzYx0zWtvoJ17J5sXktXiWdwSWK4mH8qhZiyeniTr1ns9vMb+ xgI3Rgbjzh+wRyGeW127V5bNbf3oP2RJbQfuFS1iSI7N2Izt2Ywi54p/bwcWWlxOMCEE F+DKZM4qAiogddjg9Zeidw0W+1V7p8SRtOpNyL9koJaj7PHSuvrbr8tZEAWSBjUghvP1 7q3Nsu22oBeJA/K29aHDUH0qmhVUcV6ivmcdGR4YrOPPpmZcNGp6uvRLxwlDRg8CSBT9 OfTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JyzLWOrG; 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 e14-v6si7222098pfi.184.2018.09.07.01.01.38; Fri, 07 Sep 2018 01:01:39 -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=JyzLWOrG; 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 S1728225AbeIGMlV (ORCPT + 32 others); Fri, 7 Sep 2018 08:41:21 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:33797 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728071AbeIGMlV (ORCPT ); Fri, 7 Sep 2018 08:41:21 -0400 Received: by mail-pl1-f193.google.com with SMTP id f6-v6so6246844plo.1 for ; Fri, 07 Sep 2018 01:01: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=gUJzMseyG1FoXbAQGNewzFPyGbRDffCGDi7s+gH1iDMLE4qEd2vx4VhsFHIf0H0WkX CuJsT+Dv4iz+zQl0z5c5Nrb0fSonD9pgqgHJeqh4IEXP7pQef3rQ+YjxyjSGcWyCPjvq HqBI8EbZOjZS7zhFl2hkpAVogR9R6TtrmtYC4WtaGgLfyiwyY5dR/0sYAxU1OPXMA+Ub eZuen76r/UMCZ4iRXi3QHUPNgDTP7m7+eW/Ge4B1gq9IH+p93eQ29aq3qG0GFMMD//Bi r7RtH4APFX4WZ5ItdKesMBZVpACmblafhQVfqoyNAvIDl9SE37WHS8A8H1xzYlPcWeAc 9fgA== X-Gm-Message-State: APzg51CxtMRf++zaJMTNbhN4Sly4t6IRajtJq8GEkXMLmz3ccwbmmtjj Hbw3f4UcDhrxUWB06z9XdoNu7A== 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 Cc: prudo@linux.ibm.com, 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 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> 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.18.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 {