From patchwork Wed Aug 1 07:58:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 143260 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp550463ljj; Wed, 1 Aug 2018 01:01:27 -0700 (PDT) X-Google-Smtp-Source: AAOMgpekaO3ZAekv/OG4Hu2SYPK67DMhAhvj8UZOUyy6pexnG/vGZ1hH61IAETClxiED4Q6YdKO0 X-Received: by 2002:a62:cc4d:: with SMTP id a74-v6mr25858594pfg.200.1533110487261; Wed, 01 Aug 2018 01:01:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533110487; cv=none; d=google.com; s=arc-20160816; b=h+GQgo6vXbneKYaBPnB9UycL3AKwAT2copnrZdvTzX0N4FGQMlbnZtW9QmhejykUed pAe3W1B1wL7e2XNPHv5HOkNqMMqspHTAB8t5XO5YGaYIdzbpYfAp3ayVEGZa+9sTcGiX 87BKruxaJjUWToP95HE0nnwlAunfDlPRYB59Y9AHoXYkyi6hodwA36HoqStpYEvDwf3R A1t3hC/PVtX11zkv4VkMVGmfxilOr1ftiLxF+qGtV4OydooFa4fMhlfFD+TH9s6pa1mn u7+vUIA2YBn/dlnIkw+JythKrxmqwJqBjoy3ULBH4RR+SIFr1MhC9prylTswTlV4tP5L R/Mw== 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=GoKali7qpCc9vAhjHzf54kVeD0VnMLg33enZAEs7YdIRrn0MMAtQvOdbsZWV0HLhKi 3I151Vq0bSQNf2ySz1EtNg5oQfCUpOvNouAGbzC4Pl8AgVz43CinW0nLlVIAC1UrpLoN wcjFxOSgEEFIwun+n1Q8Oajz6vl6RZWRuD3QNX5DwJ8MCjc1j3km04KhwOEo97e0QzeK aQ1ObZTviO7DzBPzeJhvQL3XRh8qDSB9vfBl1PFvF1/dpApfITKhoWY3gP4S5YFS8EVG Ipml1Mf7JVlxPudMkwi0MUQJ0rHdArf9zdxcQfv3/7mTyHtbjfDYy3ZftZo15x7PBuKv z2dA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZLy7xhwV; 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 s29-v6si16599734pfj.43.2018.08.01.01.01.27; Wed, 01 Aug 2018 01:01:27 -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=ZLy7xhwV; 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 S2388562AbeHAJpv (ORCPT + 31 others); Wed, 1 Aug 2018 05:45:51 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:39741 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387709AbeHAJpu (ORCPT ); Wed, 1 Aug 2018 05:45:50 -0400 Received: by mail-pf1-f195.google.com with SMTP id j8-v6so7434606pff.6 for ; Wed, 01 Aug 2018 01:01:24 -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=ZLy7xhwVoIk2JGm9se9fVuenhAyqRTXpFLb3RWBSFKDbrsdyjwlSdoj3/mNPxXm3Pp ParJ6WCLkg44t7OIzVyYXHtfPrCIvmj6Dy+8H27lKfdaa9VMlXMX3zv7sJcs5eOzE1ip UCnt9sSLtloaO862KDPWAqGU33k02X9kuCryM= 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=mrlilSj1KAxDWA8XtMBeS5xUQc471gsfNCO27MI1+pEVNLASmKwgiWHsUiJlK/vHSp vSJ0Jz/UblR/K9ux3x/k+I5PddXmXkSFJOa/2hOwb3aizOWWTBHqyht/HvHNDPNYuhQW GM3erY7ymA2VEIDr0X8mvglof0zINnyxTgKXvd7wZC7H0mtS+qZBrwbTUE/y4zIXEYOi J7y1ZDDKnWJ68qClsezC6vbDG9wcf7xlmIq265rVPw5mq56w+aThboyZWx42jbDdtgCg 8zfdYEoLATd+EHf4LnjjNABwSINlPeQ0kXufN78HzDkI+SC63zjmNKdK6hcvH31kEPX2 K8VQ== X-Gm-Message-State: AOUpUlEZqiDjbj4jQLML+4jrmSzakPgvxfvxBeqZFTXGb+o9Kt6pgeVr yHAZ4sh9AyAo0/WoxWOZFAmFxw== X-Received: by 2002:a63:c00b:: with SMTP id h11-v6mr23123341pgg.279.1533110484291; Wed, 01 Aug 2018 01:01:24 -0700 (PDT) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id h24-v6sm12255971pgj.10.2018.08.01.01.01.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Aug 2018 01:01:23 -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: 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 v13 14/16] include: pe.h: remove message[] from mz header definition Date: Wed, 1 Aug 2018 16:58:18 +0900 Message-Id: <20180801075820.3753-15-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180801075820.3753-1-takahiro.akashi@linaro.org> References: <20180801075820.3753-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 {