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: 62358 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp1259806lbl; Fri, 19 Feb 2016 08:29:26 -0800 (PST) X-Received: by 10.140.101.70 with SMTP id t64mr16639714qge.61.1455899365971; Fri, 19 Feb 2016 08:29:25 -0800 (PST) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id p29si15007001qki.116.2016.02.19.08.29.25 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 19 Feb 2016 08:29:25 -0800 (PST) Received-SPF: pass (google.com: domain of grub-devel-bounces+patch=linaro.org@gnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; spf=pass (google.com: domain of grub-devel-bounces+patch=linaro.org@gnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=grub-devel-bounces+patch=linaro.org@gnu.org; dkim=neutral (body hash did not verify) header.i=@linaro.org Received: from localhost ([::1]:53553 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWnvp-0001ir-G5 for patch@linaro.org; Fri, 19 Feb 2016 11:29:25 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50117) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWnvk-0001ih-KT for grub-devel@gnu.org; Fri, 19 Feb 2016 11:29:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aWnvj-0000ZH-MZ for grub-devel@gnu.org; Fri, 19 Feb 2016 11:29:20 -0500 Received: from mail-wm0-x236.google.com ([2a00:1450:400c:c09::236]:37000) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWnvj-0000Yf-CF for grub-devel@gnu.org; Fri, 19 Feb 2016 11:29:19 -0500 Received: by mail-wm0-x236.google.com with SMTP id g62so78652481wme.0 for ; Fri, 19 Feb 2016 08:29:19 -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=SvkcCxCIgwIDDMoSlrr4QC52QSqDhA9F/mIY+o6iHhqGzSQUKXmKM5e2vJxpHz4Oxi 74zOVN6SmvC9IARKtg/Bg3j98c1ZBHznctGsNyztOHVsJUNCY7CJsyDQBbAvx5PUjQCS ccaILmnJEo5OVIjFtSism/Qs92X9+jLtoh604p8NeSKuSDA9NVf/48pY+/bGUtlNBNyY cAAv/VVRw9fJMlIdJoG5wXpejc9JXR8L193UZ95a0jwAjaV5fsYLk+Wlhhw1O/5kBzGm ogg/Nso6W1oo/+XS27EgmMUdVZbiHquzT45fKwQIvU8yzjDJ3b2KAIR7StcALLdecGSA 0Hng== X-Gm-Message-State: AG10YORNNmP1mOvdbQaaliHCes5AIgd29kKhuZviZRpd6Xojuh39YzaALNptZXEUiI9x67nD 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 Subject: [PATCH] arm64: xen_boot: Fix xen boot using Grub on AARCH64 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 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::236 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 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: grub-devel-bounces+patch=linaro.org@gnu.org Sender: grub-devel-bounces+patch=linaro.org@gnu.org 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. --- grub-core/loader/arm64/xen_boot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 1.9.1 _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel Tested-by: Fu Wei 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");