From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1ONTE0-0000Dc-IZ for mharc-grub-devel@gnu.org; Sat, 12 Jun 2010 12:06:24 -0400 Received: from [140.186.70.92] (port=54628 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ONTDw-0000BL-R2 for grub-devel@gnu.org; Sat, 12 Jun 2010 12:06:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ONTDv-0001Z2-DY for grub-devel@gnu.org; Sat, 12 Jun 2010 12:06:20 -0400 Received: from mail-ww0-f41.google.com ([74.125.82.41]:36888) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ONTDv-0001Yf-9Z for grub-devel@gnu.org; Sat, 12 Jun 2010 12:06:19 -0400 Received: by wwb34 with SMTP id 34so2243537wwb.0 for ; Sat, 12 Jun 2010 09:06:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=xWd/fkkDQ2MYHIDWvb3S1w1iPsRmED+XV9D8vXqVh4A=; b=S8IkVSIO3Aa8i7dBZ7Qb9xA4KrVgNyB3R2l3nvS+IkCTNg+kNqSvGZK9eQvpELqcWR Grz4dGnYhiYG5j2H6PmAcxCP/1PxSihfKWCOQnVYleO477YsBAkwY+vBBbIOvChejGjZ 6mHJqfcshIT0s4UGZs4zEggeJPOj0MTMOSFys= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=NuHN3laEUL6T7QnnO7JSVe5Ee9WntYEdg2WOLqpn4tZmyf2vNN+8opyqkUNvNMamM8 +j5L0k8JyiKvaW1Tjb4CD3P9to4SbLWM8NsuLvlfjKcvtLAzrdkLEY2TLEaIxapbH4dd oK5Ar7uwS62mxkJypbYR+VzqF+5Xx8FCLLkhU= Received: by 10.227.145.193 with SMTP id e1mr3349516wbv.207.1276358777520; Sat, 12 Jun 2010 09:06:17 -0700 (PDT) Received: from [192.168.1.50] (c2433-1-88-160-112-182.fbx.proxad.net [88.160.112.182]) by mx.google.com with ESMTPS id p17sm11977215wbe.14.2010.06.12.09.06.16 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 12 Jun 2010 09:06:16 -0700 (PDT) Message-ID: <4C13B07F.4080208@gmail.com> Date: Sat, 12 Jun 2010 18:06:23 +0200 From: =?UTF-8?B?R3LDqWdvaXJlIFN1dHJl?= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100515 Icedove/3.0.4 MIME-Version: 1.0 To: The development of GNU GRUB References: <4BFF1337.3020100@gmail.com> <4C040166.3030502@gmail.com> In-Reply-To: <4C040166.3030502@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: [Patch] Discard incorrect nested partitions (fixes #29956) X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 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: , X-List-Received-Date: Sat, 12 Jun 2010 16:06:22 -0000 On 05/31/2010 08:35 PM, Vladimir 'φ-coder/phcoder' Serbinenko wrote: > There are few ramifications of this patch. First of all some > partitions which are just barely outside of the host partition will > lead to something like "partition not found" errors in grub-probe. It's not ideal, but IMHO it's better than getting "unknown filesystem" in grub-probe -t fs while the partition is detected fine by -t drive. > This message should be more informative (the easiest way is to issue > a warning in grub-probe if partitions are discarded except some cases > where it's known not to affect the functionality like 'd' > "subpartitions", probably such a warning in grub proper would be too > annoying though). A grub_dprintf when the partition is discarded (in the proposed patch) would only print the message for relevant partitions. > Then if you check partitions when iterating no need to recheck in > adjust_range. Agreed. >> The patch still accepts sub-partitions that start at the same >> (absolute) offset as the parent. For instance, in the above >> example, ls -l in grub gives both (hd1,msdos1) and >> (hd1,msdos1,bsd1). Should we discard (hd0,msdos1,bsd1), i.e. >> require that sub-partitions start at a strictly positive relative >> offset? > No. SUN partitions comonly start at offset 0. I don't understand what you mean: here bsd1 also starts at (relative) offset 0, and the above example actually assumed that. By the way, when several partition identifiers denote the same partition, the MBI boot_device field can have different values for the same physical partition. This means more work (or assumptions) on the kernel side to identify the root partition. In the above example, (hd1,msdos1,bsd1) would be more explicit to the NetBSD kernel than (hd1,msdos1). Grégoire