From patchwork Tue Jul 24 06:57:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 142700 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp6919153ljj; Mon, 23 Jul 2018 23:59:08 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe1f+YjHGo5bD9J1yqh82eanWhRP8+6SlLmJHQpPrGyQuu4JvYG/q1LIbhbfAkQYFXiwTkh X-Received: by 2002:a17:902:6845:: with SMTP id f5-v6mr15716437pln.173.1532415547905; Mon, 23 Jul 2018 23:59:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532415547; cv=none; d=google.com; s=arc-20160816; b=bQJQur20/nRgtIqFvk91irLbtaw4PgQMazFJk66MFntY3ufPs7ZmR7huLhWQUOwn+q 41wHW2oC1gO4/2Ho6xiyZoDVbNOTAx0YhQV2zvre+hQ1pSeU4sA9hacXmHS8ibJTgg0i bfmircvTBxD3+GwUDuRT8FCWehsrmty+rC8+M/NYFSoKOsFY7J0A3qBExbn1SpqxPJ8U x3JaH3zEieKxzr0RFXcFLeC58Fh3+qxIn0mr+yozOx5JfQ5uRr8eTMdLcFlH1dutdHaF z4/+h+VuZDdx+/sgnzkbgH5lfRiv9slVM7I+nGW1ibeLZW+wWHkqegerbbg2v5va6Myt +xkA== 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=H8r9Y6sXiWjrMnoHACDZ61CdzVHsVLeFpn0oOZb/59I=; b=uX30zb5YYJuQXTkpFZE5tX7VHma26KhMp3TIDrYewDVNml0YLo8NzW+PTnLSM/ytkj 6EGPrPH2IkGKCaCw6tN2BnVAx181+WgbBsn//RWrD0jmYfRuMV3rJHP0TzmMDvbKWC3c YgP29+etEJpeemXfQtwpnoj20wdVYBFdDyKQ/HiAgVBhoe/MjQtuTVakOHYNXCvV7sy+ Dh3IA3GhArSD9cx/Qv5J9O+M42MpQ0aik5IeNv9EsmKrCNTdDvxAH9QGoPIu0HFUld/6 fbnUa7kAvZ8DaRXjX28nitEv5AEW7mDrn4IOZz5DklZJgHr0wXM1GPWZQB3KG7SJgTae PdZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YBqxVMLi; 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 b6-v6si9511073pls.347.2018.07.23.23.59.07; Mon, 23 Jul 2018 23:59:07 -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=YBqxVMLi; 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 S2388573AbeGXIED (ORCPT + 31 others); Tue, 24 Jul 2018 04:04:03 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:37603 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388264AbeGXIEC (ORCPT ); Tue, 24 Jul 2018 04:04:02 -0400 Received: by mail-pg1-f193.google.com with SMTP id n7-v6so2192409pgq.4 for ; Mon, 23 Jul 2018 23:59:04 -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=YBqxVMLixn/XZ7QzSmXVIbTgC2hE90UJKhy++UyocFiKZo1r0isSuzudJ9uMFczRAk 33CyhfGgCIlK92u0bTUhQSMunExi5YOQUhEIe6Myke4ydsrIUkeUMIuKoNyPDP2YFTc5 pRfh70mIT9IfPcJhoFAMaH2RK39p+KF9d1whU= 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=YLNIxYI0l4OtR3rFotHg37ddYd8z8DcMotv58yUcKl5eubZKLWG8FlWU9/Ak/lkrZe VO43Iqm0Qjs+j3Xfk6oVgFTxSlfFvpbz6Kf5Q67KaTtBIuVUvxEka8a4TT4B5itoB5S4 QvsneNGw71AlrKCvoERSTq/3UgdVli8OrQeZj+npjtTPn4qiRnfmX6P+jhacvqbVn2GF ETbjX6jtHB5VvyuX8Jclj8IhvIvxlreagfQkuIx25njGIjTGPJeQYzfdSsDRTFHtCdXs +/bzPSaDKyipXZi6CgAlir7DyCaeE46WUOz6zFhv51j3c9a4e/iWfvElTjOEcOsgxxeM 8saA== X-Gm-Message-State: AOUpUlE10mlaqiVX/WTFR1Ku269UHgF3PukTVmA2xJ8JO9QLSW6Jq58W 51zt5dNENmP+0HYHUNsnPw0A8g== X-Received: by 2002:a62:1603:: with SMTP id 3-v6mr16382476pfw.245.1532415544496; Mon, 23 Jul 2018 23:59:04 -0700 (PDT) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id z5-v6sm9588659pfi.4.2018.07.23.23.59.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Jul 2018 23:59:03 -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: 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 v12 14/16] include: pe.h: remove message[] from mz header definition Date: Tue, 24 Jul 2018 15:57:57 +0900 Message-Id: <20180724065759.19186-15-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180724065759.19186-1-takahiro.akashi@linaro.org> References: <20180724065759.19186-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 {