From patchwork Thu Nov 15 05:52:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 151176 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp6594418ljp; Wed, 14 Nov 2018 21:53:43 -0800 (PST) X-Google-Smtp-Source: AJdET5cEHVeSoJHLa1r4FTxst5dNclhHSSp3zYGoQTKQtUMj4ZZvrCngakmggeLSa6lCCz/cdl24 X-Received: by 2002:a62:1e42:: with SMTP id e63-v6mr5022474pfe.149.1542261223462; Wed, 14 Nov 2018 21:53:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542261223; cv=none; d=google.com; s=arc-20160816; b=SQGAFd92cLy6hSzw09gcladYPwFVWhH2+9wWYQjzDrqlfaWsbZONyGMXZMR1tOb3PS 41JVHuulUBQq9F/hajPW5n/d7MRHghDGR0OR37iJJbQrzoWy8ypqLs5imEuMdXfHSmxq EAPdM8moJjuwl6jE2DZFIEwDtBSvxzkdyL8oBanK0pJIthaueZC6bmKzXGgrEXX6kQxZ h5DiOL981JSWEl6gkWihpCuGVW88WE4kWRLVfecdtNrje0IhBL2MwQvV+zUNlVZQYUaA r+hsAGUcdGeO/3DOage6myOodnpqC5sqJOt7nMpwKsrQjshlnnoOZ2/PMXrwJ9tgqJpR oSPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=IBZa+UOaDV8TYfXAr244/shDNprkQTt1AVYjh0q1zSg=; b=vQxpdJqpRvloxSI9/GX8RY3M7GOJp0f0IAhalNvNTQGM7RMUw8+rg9FBWfTtPrvtMS 6wuRFANzNaSCO4K39aGF5CzeGXVg3yT8yz+AJop9TBl2ThIqQk3uxYiUnmMpdHOItK2v J9A+nKZPBe2nKJQKsQea5mxxTkkF0jVU/+sjweVh7VqaqBobtI2hkMhxxy/MS4lNU0WP HfY741UmN2mAs6FdWu565S5hRlgRgzHZ0X4yI9gWTzGgf+e1BKO52RSgtKTZ9YXicR2z f8HW4P4RzY7yHCNuDUQK0RypFJp6Q8WrHLQyub+322rMI8vbGHV/9XGxKAlvjatVTGSr ePpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TU4314T9; 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 h32-v6si26885705pld.437.2018.11.14.21.53.43; Wed, 14 Nov 2018 21:53:43 -0800 (PST) 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=TU4314T9; 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 S1729091AbeKOQAG (ORCPT + 32 others); Thu, 15 Nov 2018 11:00:06 -0500 Received: from mail-yb1-f193.google.com ([209.85.219.193]:39864 "EHLO mail-yb1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727067AbeKOQAF (ORCPT ); Thu, 15 Nov 2018 11:00:05 -0500 Received: by mail-yb1-f193.google.com with SMTP id w17-v6so7910961ybl.6 for ; Wed, 14 Nov 2018 21:53:40 -0800 (PST) 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 :mime-version:content-transfer-encoding; bh=IBZa+UOaDV8TYfXAr244/shDNprkQTt1AVYjh0q1zSg=; b=TU4314T9M7hEQBduv68EORGU2Ufr/Wz+AI78lNORymGpWy2/cC1Q9Il6xST8BRNKnO XBz/sK7a/7eh1YRd+LSij8lEKqoaJRFxtgBuE/CX8HLhhQR6qLgEOj7YgqO/2Zccyutn jb1KqzVxInKix5eNyz8ZQgsXNjtFPbMhmeSx4= 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:mime-version:content-transfer-encoding; bh=IBZa+UOaDV8TYfXAr244/shDNprkQTt1AVYjh0q1zSg=; b=kdIuJL7v5b5NvEGWzDgln5X8M8oQmavkgR5CD1iX3BaW59d+JNogJuOCIt4R1MjXa3 WctR5u6BCvBgk6R/gtRCgNvZSly+wZd2pABnj0WHM2+zTXLPhR99RYPTGFbm5X9qlxWC 1Fyn+aW0ewKcJYJsajFqEr6c4t4/tisDGYOi3dnOvlpWwpCDDRGwRorYJROVAgAl9Avv gIYEUVruh/ddOfTDy5pKHdoqlxB5euXZap1DLf+Yjia6W3r86PWfaRoAHXVuvfflFgKR v7etPB3ixo+x83y+KeYxrl8GyAyB/EN5tcGjWkDjfGqrh8D2irjueWnSEGxKUtAjW89A 2+mA== X-Gm-Message-State: AGRZ1gKwmfgfipqZRWAtUEIt08TYZjpAu9L3TsLsG5Fu0cTDRIPWLccR 8Z557gkqWuvtruMoKRtlQAEmuQ== X-Received: by 2002:a25:20c6:: with SMTP id g189-v6mr4548113ybg.196.1542261219743; Wed, 14 Nov 2018 21:53:39 -0800 (PST) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id p13-v6sm7297817ywg.12.2018.11.14.21.53.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Nov 2018 21:53:39 -0800 (PST) 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: prudo@linux.ibm.com, 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 v16 14/16] include: pe.h: remove message[] from mz header definition Date: Thu, 15 Nov 2018 14:52:53 +0900 Message-Id: <20181115055254.2812-15-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181115055254.2812-1-takahiro.akashi@linaro.org> References: <20181115055254.2812-1-takahiro.akashi@linaro.org> MIME-Version: 1.0 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.19.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 {