From patchwork Tue Oct 10 06:36:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 115349 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp3401224qgn; Mon, 9 Oct 2017 23:35:04 -0700 (PDT) X-Received: by 10.84.141.1 with SMTP id 1mr11336286plu.234.1507617304659; Mon, 09 Oct 2017 23:35:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507617304; cv=none; d=google.com; s=arc-20160816; b=ZS1tp+zmao70gvHkpkbv4a5OtKIFwBPR6OgIWH+IVdteF6cACRaNzGNGCGq0JYEhxd beW3ZOS7/WF5jwVWQoXgdBDpsrqnAum2puqkn5hLnr6b9c5wZEMavBMuyTR3W3xZPggG Ynegd/L7EO16Gq+XT7pD9pHh1Iy7WTkyCKCiVvT/c/IkcsSld9FiZE9DgLUUGeX0m0A5 zm5fBGEUqSVbo8xezVwA+54OJvq3U8Pe1xH0z0cQkNLPJ7YvqDKeC0DeV1Uf0eiMVPmN 20qZ+VUp4cQ4vQ/xfgDDi+r/Yo8/c2ZVfyS3n5j2K0WaQtDICLeIpnZCludbzSJ/q+T7 Y4Fg== 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:arc-authentication-results; bh=fVNkswW2F9Q2QI2ZTaY0vlW/IrEbCVf8dY1cNKokZF4=; b=X8YLWRoBg+SFpuQSv4d9R9+q/Txl6BwmcSZG8mPmEGlfBhgyjM5kfnL8RJNe1t4hnT X6ERl7Lxr73yZPeqZmymmKzIXI62qzpP0Op57/ScQBuDAlfgu0yzddlVTgkl22YC9k2d fcFO6RtxuSKjyOz1/84z9dkGeEUbXgeyCs+rY4yX5HmEg8mwZAE+nlB9eS1i5rO4vfGt u78+miCTjBQU8LcKcIkUbM/4CQwjxQ1uIHs5o7IexPUComcwEqHscvD7DBZ6z3bsLKE7 vNb6McBPwz+fB51yZ1sKZowuxFsuNHVV3IVdH856QIY7gpaAyI31PnFICgwc6h4/PtzY fW+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dVQmLtc6; 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 p5si8117352plk.185.2017.10.09.23.35.04; Mon, 09 Oct 2017 23:35:04 -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=dVQmLtc6; 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 S1754585AbdJJGfC (ORCPT + 26 others); Tue, 10 Oct 2017 02:35:02 -0400 Received: from mail-pf0-f180.google.com ([209.85.192.180]:56541 "EHLO mail-pf0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752528AbdJJGfB (ORCPT ); Tue, 10 Oct 2017 02:35:01 -0400 Received: by mail-pf0-f180.google.com with SMTP id b85so5079371pfj.13 for ; Mon, 09 Oct 2017 23:35:01 -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=dVQmLtc6p5ZLKulcdCt8ddI103uxzC4QmTbqR5Q/jiiMuVreOoW/xUC1QqF3Y9ZXgb 4+DwMk19HRK7TBRIYdT7RNIeBT4NSb8oCXVj6KfDdddxRW1sCFSjsphlUxGMLmsdhSF1 IChoKfy9OjPLVAmJs/TPKncOmeN5USTaqWxTc= 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=JiH5wpZUnXincc1n8oPPqaVLW5OhjSBa8q/bt0e6L6JxzvIr/pKUWZifQuFY9OtlDd Cb4l/Fy0cwcaf5+fLIoQ7hbwYPjqyz72CGwHe5n/KLLfc9hPcckkwao06+Gmg0uz7InW d8YjiH1fm4qwEy4ftGq/FsD8BkszXvG8fxhIz2k5tn2577yLvfCAleSU9VquAxgMzwGt puXm1ihcBFrHw1tJoaDLg87GRvxPwQ/Ll0ELND8RTzwRKnFd4Xy1ZcqmpDT6IVfVRRbU TD/9G36isNffsYFD38nX/PKckrLYCUUA7nlljsFthUkM5hSo73tf3+MxnLau8b+vPAzt VN2Q== X-Gm-Message-State: AMCzsaWe1bLoEV/IVMd3D2YTkL6EiZkWJ59Lm5tyUIflNdWscLjJDeHX nup8EjNpoB/c8O8Lm/tWfPDXrQ== X-Google-Smtp-Source: AOwi7QD1aQDoOz5AFZ0I+szYTmDCZdTBz401hvPShAEckbPBbMXMxHqLfcm1wSa/AWdBQcPMsW7eSA== X-Received: by 10.84.236.12 with SMTP id q12mr7241000plk.204.1507617300575; Mon, 09 Oct 2017 23:35:00 -0700 (PDT) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id z127sm17908752pfb.8.2017.10.09.23.34.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Oct 2017 23:35:00 -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, julien.thierry@arm.com Cc: kexec@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, AKASHI Takahiro Subject: [PATCH v5 01/10] include: pe.h: remove message[] from mz header definition Date: Tue, 10 Oct 2017 15:36:10 +0900 Message-Id: <20171010063619.6303-2-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20171010063619.6303-1-takahiro.akashi@linaro.org> References: <20171010063619.6303-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.14.1 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 {