Re: Partition check order in fs/partition/check.c?

Russell King (rmk@arm.linux.org.uk)
Tue, 1 Apr 2003 14:27:43 +0100


On Tue, Apr 01, 2003 at 03:14:56PM +0200, Peter Oberparleiter wrote:
> Hm, what do you think of these additional checks:
>
> 1. Check for overlap of partitions

That's something which should be done for any partitioning method imho.
I have heard of some situations where, on x86 machines, the DOS and
ext2 filesystems overlapped, but somehow managed to keep working for
a considerable period of time. Then when it all goes wrong, the user
blamed Linux for screwing their DOS/Windows partition.

This might be an acceptable way out of this problem.

> 2. Check for number of recognized partitions (i.e. size != 0) > 0

If the checksum seems to be correct and you mis-parse an x86 bios
partition table as powertec, chances are that you'll have a non-zero
size word somewhere in that sector.

> 3. Check for struct ptec_partition.unused1, unused2, unused5 == 0
> (assuming they default to zero)

Unfortunately they don't default to zero.

-- 
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/