From patchwork Sat Jun 23 02:20:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 139741 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp1548151lji; Fri, 22 Jun 2018 19:21:52 -0700 (PDT) X-Google-Smtp-Source: ADUXVKI8vcxoGXAkP7KDrvr2Jn9XOHai/jGrgR0vcoRwxcJXs7UHvfXSxI/oMQB6thULUgZMPUSF X-Received: by 2002:a17:902:28ea:: with SMTP id f97-v6mr3773534plb.55.1529720512452; Fri, 22 Jun 2018 19:21:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529720512; cv=none; d=google.com; s=arc-20160816; b=sFBCJdrGnnMQWb+lXjtYIzGh9Pj90PKjrJyq4g1AMXcLheYVaERvL/1hOOq6C+3WFK YHKTVJglt+YeizB5tw452k80Gv4H0uYzrHd7ScscOL47lwETWAOU6TkzWm4Kbgywuq7l TK6+uLndOis+IVMXBnaYnB94SY7aj3OFnCHkxuCPRTyRnCrmD84Hae/U1uaLdWevoFR5 0vW0+1sVm4K+lxKl+v81EHz6WJXfP5BiH9wwY2l5DxrjcZmHyVt7EHtoRgE1fxO1R1m+ J4wz3/n4Oo9lMNuvxw0fXyLrY+xNqJqiMbQnxQHiYoQRuJgvLnffKeL/k92i9h2sLHCo cxLA== 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=udBD3FA/hkAWhAoznOJdhSIXwaGNnm+w3oMPbyzv9VI=; b=QbNiwAzTRcKJ1p+kdtQ8s8S6/ZGGetv5cMPtdkRL59XGoyROp+V8I7oZvop5hg58vM xcJl2JfcJuS9G+C5Ye5+xdcjX6pPlMTPFUL8qyYaL8FvMzRv92/MyjOmaDBplQ2TDsd0 oJWUndgF6pJ+2LPf3FP0BjpbK05PvwhReRlq/JB6aRa6J8gB3UXH71X7kFPC38b4bJdk rIe51EGuAS6A1qdO2UtBtmbGYhwGW+jcWff5X8NWFMszixqoLB7aae5PtlXol+4H70rD tTIAxJRIk0IcIhmrQdiTeT9KDLZ1iF6Op4D2OGJBLXcaPZ0fjP72rmSZslePDvReU1Mx jafA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bvVauCGB; 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 m11-v6si7374029pgr.104.2018.06.22.19.21.52; Fri, 22 Jun 2018 19:21:52 -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=bvVauCGB; 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 S934894AbeFWCVs (ORCPT + 31 others); Fri, 22 Jun 2018 22:21:48 -0400 Received: from mail-pl0-f67.google.com ([209.85.160.67]:43354 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934856AbeFWCVp (ORCPT ); Fri, 22 Jun 2018 22:21:45 -0400 Received: by mail-pl0-f67.google.com with SMTP id c41-v6so4258088plj.10 for ; Fri, 22 Jun 2018 19:21:44 -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=bvVauCGB9Hm2Bb0o1aB8Aacw6uucFZsvKbEX40YEelruZ9bsDMWVSFzU7q8KVzh6NK ZIUrL/AqvCo7e6U9KIBvyZO3TyCShQqcwFEjWn7DEEpkHHp59J4fs72agpqIzcwCrsbp IG733DPRpl6omveHC3bFGjMRrQrdCgFHDdR5U= 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=RXW+zAkSVhOMI7F54NPqlLMuHPyYp01J/oE3xZ0xJWx8dfmQCQSM+ckOrcFSVfaBrS SGyA7VX8RTD67nVkrtP3UjJxetbgx3mUT81kItL498w3e76KWDNcr75aCUT4RvbQ0+ZM hLlmaAswCSjrElzb/W8nfvHghuzYsUfjuakYUVbdL7tsy7Crz2yqS4ShqciMFyoabiJn xE/7UEawKePqdejEZ71nE7BVyOBRaoRAFfUE7AwpiVnSEHP3E9wUn22wYjdKLWTyBKHt keoi8/q3PZ2V31y1TiFYhRbRpPMBoSkwYjcr/CQ2f3rKbG8Eg/0MBiJo52EhFSbxzY9d m4bw== X-Gm-Message-State: APt69E2PuyhbYnIuxzdXRtDridTbXzHmC0s+2VvyRyq8ySCvBZc29fBb H2W6qyiCQ3sC47TwJ6cfl//NRA== X-Received: by 2002:a17:902:8a4:: with SMTP id 33-v6mr3812654pll.343.1529720504602; Fri, 22 Jun 2018 19:21:44 -0700 (PDT) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id d88-v6sm20012850pfb.43.2018.06.22.19.21.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jun 2018 19:21:44 -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 Cc: 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 v10 12/14] include: pe.h: remove message[] from mz header definition Date: Sat, 23 Jun 2018 11:20:56 +0900 Message-Id: <20180623022058.10935-13-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180623022058.10935-1-takahiro.akashi@linaro.org> References: <20180623022058.10935-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.17.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 {