Subject: Re: bounds checking RAW_PART [was: Re: CVS commit: src/sys/dev]
To: Jason R Thorpe <firstname.lastname@example.org>
From: Manuel Bouyer <email@example.com>
Date: 01/27/2003 22:22:52
On Sun, Jan 26, 2003 at 04:21:07PM -0800, Jason R Thorpe wrote:
> On Mon, Jan 27, 2003 at 01:15:39AM +0100, Christoph Badura wrote:
> > No Unix that I've used in the last 20 years has done this and I've never
> > had a need to read beyond the end of the raw partition. And if I suddenly
> > felt that urge, I'd simply change the disklabel to include more sectors.
> > There's nothing that prevents you from doing that.
> > Note also that a number of drivers has been bounds checking RAW_PART forever
> > and nobody seems to complain.
> I have no problem with bounds-checking RAW_PART. But it should not be
> done with bound_check_with_label(). That function is desinged to bounds-
> check against the disklabel. RAW_PART is not to be checked against the
> disklabel. That is my only objection.
I don't think it should be done for SCSI disks and CD, which reports EOM fine.
Something needs to be done for IDE, and I think I've found how.
Manuel Bouyer <firstname.lastname@example.org>
NetBSD: 24 ans d'experience feront toujours la difference