From patchwork Fri Sep 8 03:16:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 111998 Delivered-To: patch@linaro.org Received: by 10.140.94.239 with SMTP id g102csp939657qge; Thu, 7 Sep 2017 20:15:17 -0700 (PDT) X-Received: by 10.98.79.157 with SMTP id f29mr1612667pfj.9.1504840517521; Thu, 07 Sep 2017 20:15:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504840517; cv=none; d=google.com; s=arc-20160816; b=cqOj4iZmdP50+uwsdLNb1TLbE03QNSPAIw1FvM6rNwA7w8rkYLe6n+gVuzcpTiN7L/ nfyzZXhhuq4T7QyUPTLmPFKj/KwwhvTG5PBx+HfNOWuFThb1ElIUziQmcyb50K0I+h71 N05bz56PAG2Eqjtfqc8PxomesqQjiH8byyqkYuNekd67LetvOU3o9V6o2+GjLViplw8P cconUqMa4XDd0GKFU/RU9tza8LEyvyCsRMHQphrov9izIS6b5FfSADgKDOgCnyctoB0i 9Ie5XeRSnDpguDLFHOkq5v8VstN9cVkc1MZAeYVa4wwrESWsimynNFeR4nWbuw158xAH Rq/Q== 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=l1tnzYtMdvu57RQwBEkmc/w41fsiU8kih3dqNTi6qfMetzXzTHrhAS1+zArMlWNldS UjgwCa/WyJoSVmtiEDNV4F242/Dq6MUQ8yxBbrrymRrQEwFeVN9C+eGEPwJ0Xgmwep/T vnwEAdYOvigisWh1+VClMQYuw2MQWGAF9ipLOTP4uPcsAQiPWyY5KBSmSxirxMvkgi+S 8LfTgJ7Da1y5xWySVPzvFBQB4WZClc/BE/GwRxGnQa5oW3y5qJRsEEB0UP7Z/8sIgK9J zIXid4MfosqMK0er/k1v6Cty1LmW++BWzl59pAcJrumuP/c7/gs/XDJlm5hGRVwxTBEQ bSPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UVuutmYg; 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 w76si346354pfi.609.2017.09.07.20.15.17; Thu, 07 Sep 2017 20:15:17 -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=UVuutmYg; 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 S1754187AbdIHDPD (ORCPT + 26 others); Thu, 7 Sep 2017 23:15:03 -0400 Received: from mail-pf0-f181.google.com ([209.85.192.181]:35061 "EHLO mail-pf0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754133AbdIHDPA (ORCPT ); Thu, 7 Sep 2017 23:15:00 -0400 Received: by mail-pf0-f181.google.com with SMTP id g13so2548140pfm.2 for ; Thu, 07 Sep 2017 20:15:00 -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=UVuutmYgb38KJeGlT/mw6Lc0PeD+YjsEIYh35ghtkJCz2W7oBUVgIfHKVkHq5oNw3i o2eDdeoxJ2KC9w72+ZGrvYUhGNu7Jx8/trrObZ5gGkLQCOOzvVf3CtHp8o4fMELHuV+y 6orJa1zvmS2NKIVpbQDX8v9dIbCk57KHPCxSs= 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=Pug6fBanh/hJeKCUb4pK75luEnNAkmiWWcK9KzwAADCq5eRt1G2jIkevJRlLcxSpr6 i2YO+5p3qZrASrVED5XJiz/rdWHvsEqgC/o2l7ip2SaOdvXSimlL/52Bb3xZ+0Q4bvIM DH7IpjWAck0UnGweHHWRZ5C+dAzP6iLKJq0DkN4KV6p8IPP/aZQY4Z/FbVDW4c/qH4mx 9nGFBZZrXumDN4ILyhFVHDwZzY96OIsttjeC/wpOUyY4DCjiZZStErtxVMAPqyf8mSNs bXTXArgQuXxayNyZi1E2o5nYqEGgi6a+bDaSM6E8IrKo/UAt2OJUz7j93TCmJZQry3Mu rnJg== X-Gm-Message-State: AHPjjUgQKEqYk87r7mqHN0TSyisvBcfnJQlhRTlxiBwDRyQc6HBDQPOm GOCgxcl3xUXqFA3T X-Google-Smtp-Source: ADKCNb58+KK7PUsWB5i05hgR0/vttUqMUauv1P93Hm7c2Dx5P/ACr8HzcAdNX+5mUP1sUefU4Jdjtw== X-Received: by 10.84.231.202 with SMTP id g10mr1692028pln.407.1504840500195; Thu, 07 Sep 2017 20:15:00 -0700 (PDT) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id y68sm1198795pfk.145.2017.09.07.20.14.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Sep 2017 20:14:59 -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 Cc: kexec@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, AKASHI Takahiro Subject: [PATCH 1/9] include: pe.h: remove message[] from mz header definition Date: Fri, 8 Sep 2017 12:16:08 +0900 Message-Id: <20170908031616.17916-2-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170908031616.17916-1-takahiro.akashi@linaro.org> References: <20170908031616.17916-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 {