From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MUxXd-00088q-Oh for mharc-grub-devel@gnu.org; Sun, 26 Jul 2009 02:49:05 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MUxXb-00088h-S4 for grub-devel@gnu.org; Sun, 26 Jul 2009 02:49:03 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MUxXW-00083H-Hn for grub-devel@gnu.org; Sun, 26 Jul 2009 02:49:02 -0400 Received: from [199.232.76.173] (port=41561 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MUxXW-00082t-AX for grub-devel@gnu.org; Sun, 26 Jul 2009 02:48:58 -0400 Received: from mx20.gnu.org ([199.232.41.8]:60661) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MUxXV-0007sQ-OC for grub-devel@gnu.org; Sun, 26 Jul 2009 02:48:57 -0400 Received: from moutng.kundenserver.de ([212.227.17.8]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MUxXU-0007tS-Bw for grub-devel@gnu.org; Sun, 26 Jul 2009 02:48:56 -0400 Received: from [85.180.49.97] (e180049097.adsl.alicedsl.de [85.180.49.97]) by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis) id 0MKsym-1MUxXS1qYE-000Yfp; Sun, 26 Jul 2009 08:48:54 +0200 From: Felix Zielcke To: The development of GRUB 2 In-Reply-To: References: <1248454704.3510.67.camel@fz.local> <1248463471.3510.77.camel@fz.local> <20090725163636.GL12326@thorin> <1248559576.11389.33.camel@mj> Content-Type: text/plain Date: Sun, 26 Jul 2009 08:49:43 +0200 Message-Id: <1248590983.3661.2.camel@fz.local> Mime-Version: 1.0 X-Mailer: Evolution 2.27.4 Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX1/cMVSZoIuTCt/Lhnvqr+HiRXVIYrBgGoF0TYj jqv/cHQIY3YDGUey073BexnCOA7plxxDhb+quB/fzlK7/fAjn+ qkfJXsPWE0K9ekWi+M/28Nau1mX16IC X-Detected-Operating-System: by mx20.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Subject: Re: [PATCH] fix an infinite loop with a corrupted pc partition table X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Jul 2009 06:49:04 -0000 Am Sonntag, den 26.07.2009, 01:20 +0200 schrieb Vladimir 'phcoder' Serbinenko: > On Sun, Jul 26, 2009 at 12:58 AM, Vladimir 'phcoder' > Serbinenko wrote: > > On Sun, Jul 26, 2009 at 12:35 AM, Vladimir 'phcoder' > > Serbinenko wrote: > >>> Links backwards between extended partition entries are more likely > to be > >>> due to data corruption than due to buggy partitoning tools. OK, > if you > >>> want, let's support up to 10 backward links. That's more than > enough. > >> I remembered a compact algorithm for detecting loops of such kind I > >> will implement it and submit a patch and we'll see how really > compact > >> it is > > Here it is. Strange that I haven't remembered this algorithm before. > > Can someone test this patch? > Small optimisation This works with the partition table of the initial bug report: /home/fz/grub/grub2-1.96+20090725/kern/partition.c:106: Detecting pc_partition_map... /home/fz/grub/grub2-1.96+20090725/kern/disk.c:389: Reading `hd1'... /home/fz/grub/grub2-1.96+20090725/partmap/pc.c:153: partition 0: flag 0x0, type 0x5, start 0x0, len 0x11177330 /home/fz/grub/grub2-1.96+20090725/partmap/pc.c:153: partition 1: flag 0x0, type 0x0, start 0x0, len 0x0 /home/fz/grub/grub2-1.96+20090725/partmap/pc.c:153: partition 2: flag 0x0, type 0x0, start 0x0, len 0x0 /home/fz/grub/grub2-1.96+20090725/partmap/pc.c:153: partition 3: flag 0x0, type 0x0, start 0x0, len 0x0 /home/fz/grub/grub2-1.96+20090725/kern/disk.c:389: Reading `hd1'... /home/fz/grub/grub2-1.96+20090725/kern/partition.c:112: pc_partition_map detection failed. /home/fz/grub/grub2-1.96+20090725/kern/disk.c:333: Closing `hd1'. -- Felix Zielcke Proud Debian Maintainer