grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] fix an infinite loop with a corrupted pc partition table


From: Felix Zielcke
Subject: Re: [PATCH] fix an infinite loop with a corrupted pc partition table
Date: Sun, 26 Jul 2009 08:49:43 +0200

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<address@hidden> wrote:
> > On Sun, Jul 26, 2009 at 12:35 AM, Vladimir 'phcoder'
> > Serbinenko<address@hidden> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]