From: Andries Brouwer <Andries.Brouwer@cwi.nl>
To: Andrew Morton <akpm@osdl.org>
Cc: Andries Brouwer <Andries.Brouwer@cwi.nl>,
mikem@beardog.cca.cpqcorp.net, linux-kernel@vger.kernel.org,
linux-scsi@vger.kernel.org
Subject: Re: [PATCH] make kernel ignore bogus partitions
Date: Thu, 11 May 2006 13:51:17 +0200 [thread overview]
Message-ID: <20060511115117.GA870@apps.cwi.nl> (raw)
In-Reply-To: <20060511040014.66ea16fc.akpm@osdl.org>
On Thu, May 11, 2006 at 04:00:14AM -0700, Andrew Morton wrote:
> > Yes, it should.
> > And no "ignoring". And no "continue". E.g.:
> >
> > printk(" %s: warning: p%d exceeds device capacity.\n", ...);
> >
>
> So you're saying that after detecting this inconsistency we should proceed
> to use the partition anyway?
>
> For what reason?
The normal situation is that partitions are contained within
the disk. In the normal situation the test is superfluous.
Suppose the test fails. Why might that be? There isn't really
a good scenario where this is a mistake. In all the (rare) cases
that I can imagine, it would make matters worse to reject the
partition and make access impossible (or at least more difficult).
Case 1: The kernel is mistaken about the size of the disk.
(There are commands to clip a disk to a certain capacity,
there are jumpers to tell a disk that it should report a certain
capacity etc. Usually this is because of BIOS bugs. In bad cases
the machine will crash in the BIOS and hence fail to boot if
the disk reports full capacity.)
In such cases actually accessing the blocks of the partition
may work fine, or may work fine after running an unclip utility.
I wrote "setmax" some years ago precisely for this reason.
Case 2: There was a messy partition table (maybe just a rounding
error) but the actual filesystem on the partition is contained
in the physical disk. Now using the filesystem goes without problem.
Case 3: Both partition and filesystem extend beyond the end of the disk.
In forensic or debugging situations one often uses a copy of the start
of a disk. Now access beyond the end gives an expected I/O error.
Andries
next prev parent reply other threads:[~2006-05-11 11:51 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-03 21:00 [PATCH] make kernel ignore bogus partitions Mike Miller (OS Dev)
2006-05-08 7:27 ` Andries Brouwer
2006-05-08 15:00 ` Douglas Gilbert
2006-05-08 15:33 ` David Greaves
2006-05-08 20:20 ` Jan Engelhardt
2006-05-08 20:46 ` reiser4 bug [was Re: 2.6.17-rc3-mm1] Alexander Gran
2006-05-08 23:21 ` Joe Feise
2006-05-09 0:13 ` Alexander Gran
2006-05-09 19:41 ` [PATCH] make kernel ignore bogus partitions Andrew Morton
2006-05-09 22:48 ` Andries Brouwer
2006-05-11 11:00 ` Andrew Morton
2006-05-11 11:51 ` Andries Brouwer [this message]
2006-05-11 16:04 ` Mike Miller (OS Dev)
2006-05-11 23:08 ` Daniel Barkalow
2006-05-12 10:32 ` Jan Engelhardt
2006-10-30 19:45 ` Phillip Susi
2006-10-30 21:48 ` Christian Schmidt
2006-05-11 21:47 ` Mike Miller (OS Dev)
2006-05-11 16:17 ` Mike Miller (OS Dev)
2006-05-11 16:27 ` Andrew Morton
2006-05-11 17:09 ` Alan Cox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060511115117.GA870@apps.cwi.nl \
--to=andries.brouwer@cwi.nl \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mikem@beardog.cca.cpqcorp.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox