Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751784AbdHXJEX (ORCPT ); Thu, 24 Aug 2017 05:04:23 -0400 Received: from mail-io0-f180.google.com ([209.85.223.180]:36662 "EHLO mail-io0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751260AbdHXJEW (ORCPT ); Thu, 24 Aug 2017 05:04:22 -0400 MIME-Version: 1.0 In-Reply-To: <20170824081811.19299-3-takahiro.akashi@linaro.org> References: <20170824081811.19299-1-takahiro.akashi@linaro.org> <20170824081811.19299-3-takahiro.akashi@linaro.org> From: Ard Biesheuvel Date: Thu, 24 Aug 2017 10:04:20 +0100 Message-ID: Subject: Re: [PATCH 02/14] include: pe.h: remove message[] from mz header definition To: AKASHI Takahiro Cc: Catalin Marinas , Will Deacon , Thiago Jung Bauermann , David Howells , Vivek Goyal , Herbert Xu , "David S. Miller" , Andrew Morton , Michael Ellerman , Dave Young , Baoquan He , Arnd Bergmann , "kexec@lists.infradead.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1290 Lines: 33 On 24 August 2017 at 09:17, AKASHI Takahiro wrote: > 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 > 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(-) > > 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 { Reviewed-by: Ard Biesheuvel