Received: from list by lists.gnu.org with archive (Exim 4.71) id 1ch9xG-0002L7-Dh for mharc-grub-devel@gnu.org; Fri, 24 Feb 2017 02:06:14 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50388) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ch9xD-0002Jd-UO for grub-devel@gnu.org; Fri, 24 Feb 2017 02:06:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ch9x8-0008Pg-PX for grub-devel@gnu.org; Fri, 24 Feb 2017 02:06:11 -0500 Received: from mail-lf0-x235.google.com ([2a00:1450:4010:c07::235]:35440) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ch9x8-0008PU-Hx for grub-devel@gnu.org; Fri, 24 Feb 2017 02:06:06 -0500 Received: by mail-lf0-x235.google.com with SMTP id z127so5346909lfa.2 for ; Thu, 23 Feb 2017 23:06:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding; bh=OAnLIyEL9KpY/GOyCdisguUj5YSEyKtwydZdzhtuQnU=; b=KzPRcVujNecnLZ3Oi3wg38Gpr7C1udUPwPRKAm46DtgkdJ3w/ndtf7WggOfk8juJ5C 5JmRMTvUXXyDeQNo9IJ3cfTWFT22aJU3brCW/fZ2Fo3iyLjnZnBo9YOBjQa8jYPXMSgW JML0IGfiu3WMponWkhnu1M+soIG3rIm7pOEFEUxXhntEnyjHKRRhhKvnPw9xo+JOcJYE ACv5XPi0LDN8Odvb1YBs1NRWYeyxZMszOXzepIXIVbasTFwZZtLx5YuEYTeUg8GKXEOz 3zm7BsvH3K5wRcvhjY+k4JrI3qZKcp8OtFAE8ptqNOBOt4Q42we0TLobspUzIxQzyPNb IGeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding; bh=OAnLIyEL9KpY/GOyCdisguUj5YSEyKtwydZdzhtuQnU=; b=k/sjx0KVhsA4Q+qZhS1r1CoMUh44GLDIYsue9W/wboJVnXe/pfPt+KHGWDX+yPwGq0 XjYzY9zLOVLWhwsNZdBwhwp2sKNylkofQ/d9qadlDGHpn3FNW/QtuJG8L6FxC0zw14QL CpGrzzXSOb+CfA1hzErand8PgZVux+jllwJ9/nMR3ftCO6SVhRnB4MiwRkOSaefgo1hp 6tsDtB8ned9NCuB9Ms2zoEDC4bPA95Y69ovhhZefCxSaqRpqtJLmsshkIjx1S3igdSY9 S7gkXKEnlgECOu+kLFD+QX10qhZmJ3MKjb2EFeSfWB+/6/QxtVVxkkKzcgl6AWnqhnDy AW7g== X-Gm-Message-State: AMke39lddSB7vzj7trplTq3FaRN3bJJewkBsPCYX0kcFHIuj7MKvboe5VIjqWELEZNh4nQ== X-Received: by 10.25.141.12 with SMTP id p12mr377568lfd.147.1487919964830; Thu, 23 Feb 2017 23:06:04 -0800 (PST) Received: from [192.168.1.6] (ppp109-252-90-129.pppoe.spdop.ru. [109.252.90.129]) by smtp.gmail.com with ESMTPSA id a11sm991506lfh.37.2017.02.23.23.06.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Feb 2017 23:06:04 -0800 (PST) To: edk2-devel-01 , The development of GNU GRUB From: Andrei Borzenkov Subject: Should Path Name in File Path Media Device Path node be NULL terminated? Message-ID: <4f2ae7ff-9e79-8fd7-5a09-0841e3f21d0c@gmail.com> Date: Fri, 24 Feb 2017 10:06:03 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c07::235 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2017 07:06:12 -0000 Historically grub2 built image paths using two File Path nodes - one for directory and one for file name relative to directory. These nodes had path names that were not NULL terminated. Recently we had bug report that secure boot using grub2 failed. It was tracked down to exactly the fact that paths were not NULL terminated. See http://git.savannah.gnu.org/cgit/grub.git/commit/?id=ce95549cc54b5d6f494608a7c390dba3aab4fba7 Unfortunately this caused another regression which looks like firmware truncating passed image path on first NULL https://bugzilla.opensuse.org/show_bug.cgi?id=1026344 Could someone clarify what is expected by EFI spec? Should each Path Name (even intermediate) be NULL terminated, or spec intends to say that only full path must be NULL terminated?