From patchwork Fri Feb 19 16:28:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 8362711 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2194F9F372 for ; Fri, 19 Feb 2016 16:31:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5196F20524 for ; Fri, 19 Feb 2016 16:31:55 +0000 (UTC) Received: from lists.xen.org (lists.xenproject.org [50.57.142.19]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7493F20522 for ; Fri, 19 Feb 2016 16:31:54 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aWnvl-0006tc-9V; Fri, 19 Feb 2016 16:29:21 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aWnvk-0006tU-CF for xen-devel@lists.xen.org; Fri, 19 Feb 2016 16:29:20 +0000 Received: from [193.109.254.147] by server-12.bemta-14.messagelabs.com id 11/25-09834-FD247C65; Fri, 19 Feb 2016 16:29:19 +0000 X-Env-Sender: julien.grall@linaro.org X-Msg-Ref: server-13.tower-27.messagelabs.com!1455899358!25220339!1 X-Originating-IP: [74.125.82.48] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 7.35.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 45949 invoked from network); 19 Feb 2016 16:29:18 -0000 Received: from mail-wm0-f48.google.com (HELO mail-wm0-f48.google.com) (74.125.82.48) by server-13.tower-27.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 19 Feb 2016 16:29:18 -0000 Received: by mail-wm0-f48.google.com with SMTP id g62so78652472wme.0 for ; Fri, 19 Feb 2016 08:29:18 -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; bh=bKcZTpLFgmmN95oJQ6A0qaDGphhygDkPpGdTN0Arbk0=; b=JMdj5U1tMp6/qVvEfUbMM8TZVyOcTvt+gAAACUdt8DAucPiPQ/uqVWrb6hNnEFgK2I WxSqBsA9MkqZr+86raICGqgGFWpf5kacTA/lHms8rPIlL9pQ+EiKpXUkY6jnbu0Ix+b1 YFbGHTajO1bIbdI7aHdD3kVi/9RMEyfRWhf8s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=bKcZTpLFgmmN95oJQ6A0qaDGphhygDkPpGdTN0Arbk0=; b=HbS1OXyDfCG8kwcV7jwtHA/U1r2kZg+yFN5SW6/nIIXX5H2dy5mmwTcH/Pdur4kICp ESLSw+d0TmCbAX8h5CfQ1mKwpQ2BM3GNw8k1ElR26EL6vjjE+juIrR9WPe1bM55XzMrG w/5zwit7A2G9mOi/lu2JSPu/mhtieYeI8F6Ap7QlgPHTDMBnvsQ8C3TlyAflnwV7UTcn zPb87VYq9TWbjwZGPnzo2MCarisc1iN7Dsf6ncb7PENlG0PF6FDKKXvpqAbXNGLHn0KO yggW3u1OZSp6DF9QHZ0eJpeSRiYGpaUzHxP6tTRWpgo2IrhwEbC0m9DogaW1tk3tVcMW oCWg== X-Gm-Message-State: AG10YORURa+/5jDncPAHQUp19KdcV8ZFrGkNiqAI21xsAOLYAAydut88yzWHaiJjSEUSTDAJ X-Received: by 10.28.35.14 with SMTP id j14mr10561014wmj.80.1455899358362; Fri, 19 Feb 2016 08:29:18 -0800 (PST) Received: from e108454-lin.cambridge.arm.com ([2001:41d0:1:6c23::1]) by smtp.gmail.com with ESMTPSA id i5sm11890788wjx.15.2016.02.19.08.29.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 19 Feb 2016 08:29:17 -0800 (PST) From: Julien Grall To: grub-devel@gnu.org Date: Fri, 19 Feb 2016 16:28:52 +0000 Message-Id: <1455899332-9054-1-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.9.1 Cc: ian.campbell@citrix.com, steve.capper@arm.com, phcoder@gmail.com, Julien Grall , xen-devel@lists.xen.org, stefano.stabellini@citrix.com, fu.wei@linaro.org Subject: [Xen-devel] [PATCH] arm64: xen_boot: Fix xen boot using Grub on AARCH64 X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Xen is currently crashing because of malformed compatible property for the boot module. This is because the property string is not null-terminated as requested by the ePAR spec. Tested-by: Fu Wei --- grub-core/loader/arm64/xen_boot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grub-core/loader/arm64/xen_boot.c b/grub-core/loader/arm64/xen_boot.c index a914eb8..8ae43d7 100644 --- a/grub-core/loader/arm64/xen_boot.c +++ b/grub-core/loader/arm64/xen_boot.c @@ -156,7 +156,7 @@ prepare_xen_module_params (struct xen_boot_binary *module, void *xen_boot_fdt) grub_fdt_add_subnode (xen_boot_fdt, chosen_node, module_name); retval = grub_fdt_set_prop (xen_boot_fdt, module_node, "compatible", - MODULE_CUSTOM_COMPATIBLE, sizeof(MODULE_CUSTOM_COMPATIBLE) - 1); + MODULE_CUSTOM_COMPATIBLE, sizeof(MODULE_CUSTOM_COMPATIBLE)); if (retval) return grub_error (GRUB_ERR_IO, "failed to update FDT");