From patchwork Tue Jan 7 17:06:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leif Lindholm X-Patchwork-Id: 22917 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f72.google.com (mail-pa0-f72.google.com [209.85.220.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 52A49202E0 for ; Tue, 7 Jan 2014 17:06:31 +0000 (UTC) Received: by mail-pa0-f72.google.com with SMTP id bj1sf1620774pad.11 for ; Tue, 07 Jan 2014 09:06:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:date:from:to:subject:message-id :mime-version:user-agent:precedence:reply-to:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list:content-disposition :content-type:content-transfer-encoding; bh=A6Qu9AGRl+ltFZeHKj3m8s1h9Byi1cJlEW9sId/MTR0=; b=TMOsOfwZCEhhu0XG0wF+y9lEpXVFSg0DrIluv0LLQ/yMudGsXKSLfEAoricmwvrzj/ LLCdtpCMfD9IzqHcPpPVzZ01JsRFPJaND0+VS7u6ZDqX4gfe/C7Bixe30kdRYc/c+T7y lQIrHkhgm2F9eFEa0Y1Ds2PgLXAML67LRXe41T5SbkrmGOkM6Pcplfj1I1WsGoD7q5yn tDx+5qr8MFxTW18go/t8ojb+CBpcluyTmCFtl1lIGiS99qpm7S0MLby9ajQUhqfRGmsz q1amSuC2xlvGCKDoSxTASlAKR4tW9CBHa0xV8uwaNLucIggjnnFV807nig44tine4I6M M7QQ== X-Gm-Message-State: ALoCoQmr4YY0SQJ8+7VZJo14E/jf7CSU3snR0mokBSv3PNq9nwr45w+IowwREpd2Lh2kpJP4ODle X-Received: by 10.66.118.37 with SMTP id kj5mr2430354pab.17.1389114388947; Tue, 07 Jan 2014 09:06:28 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.84.234 with SMTP id c10ls199923qez.50.gmail; Tue, 07 Jan 2014 09:06:28 -0800 (PST) X-Received: by 10.53.1.231 with SMTP id bj7mr3080242vdd.55.1389114388830; Tue, 07 Jan 2014 09:06:28 -0800 (PST) Received: from mail-vb0-f53.google.com (mail-vb0-f53.google.com [209.85.212.53]) by mx.google.com with ESMTPS id a15si34277349vew.121.2014.01.07.09.06.28 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 07 Jan 2014 09:06:28 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.53 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.53; Received: by mail-vb0-f53.google.com with SMTP id o19so300538vbm.40 for ; Tue, 07 Jan 2014 09:06:28 -0800 (PST) X-Received: by 10.52.248.238 with SMTP id yp14mr1966125vdc.81.1389114388687; Tue, 07 Jan 2014 09:06:28 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.59.13.131 with SMTP id ey3csp172209ved; Tue, 7 Jan 2014 09:06:28 -0800 (PST) X-Received: by 10.49.35.52 with SMTP id e20mr198250915qej.63.1389114388211; Tue, 07 Jan 2014 09:06:28 -0800 (PST) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id k6si76965113qej.90.2014.01.07.09.06.28 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 07 Jan 2014 09:06:28 -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; Received: from localhost ([::1]:41886 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0a6l-0002pQ-QE for patch@linaro.org; Tue, 07 Jan 2014 12:06:27 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45661) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0a6L-0002g7-2t for grub-devel@gnu.org; Tue, 07 Jan 2014 12:06:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W0a6C-0005rD-SM for grub-devel@gnu.org; Tue, 07 Jan 2014 12:06:00 -0500 Received: from mail-wi0-f179.google.com ([209.85.212.179]:33270) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0a6C-0005qp-LX for grub-devel@gnu.org; Tue, 07 Jan 2014 12:05:52 -0500 Received: by mail-wi0-f179.google.com with SMTP id z2so985878wiv.12 for ; Tue, 07 Jan 2014 09:05:51 -0800 (PST) X-Received: by 10.194.78.210 with SMTP id d18mr78589311wjx.27.1389114351562; Tue, 07 Jan 2014 09:05:51 -0800 (PST) Received: from bivouac.eciton.net (bivouac.eciton.net. [46.235.226.95]) by mx.google.com with ESMTPSA id e5sm31155828wja.15.2014.01.07.09.05.50 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 07 Jan 2014 09:05:50 -0800 (PST) Date: Tue, 7 Jan 2014 17:06:08 +0000 From: Leif Lindholm To: grub-devel@gnu.org Subject: [patch] arm64: set correct length of device path end entry Message-ID: <20140107170607.GB30907@bivouac.eciton.net> MIME-Version: 1.0 User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.212.179 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: grub-devel-bounces+patch=linaro.org@gnu.org Sender: grub-devel-bounces+patch=linaro.org@gnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: leif.lindholm@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.53 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Content-Disposition: inline The length of the Device Path End entry in the grub_linux_boot() funtcion is incorrectly set to 0. This triggers an assert failure in debug builds of Tianocore. The correct length is 4 bytes (1 byte type, 1 byte subtype, 2 bytes length). Reported-by: Mark Salter diff --git a/grub-core/loader/arm64/linux.c b/grub-core/loader/arm64/linux.c index 9d15aad..7c9bc2b 100644 --- a/grub-core/loader/arm64/linux.c +++ b/grub-core/loader/arm64/linux.c @@ -268,7 +268,7 @@ grub_linux_boot (void) mempath[1].header.type = GRUB_EFI_END_DEVICE_PATH_TYPE; mempath[1].header.subtype = GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE; - mempath[1].header.length = 0; + mempath[1].header.length = 4; b = grub_efi_system_table->boot_services; status = b->load_image (0, grub_efi_image_handle,