Subject: kern/20934: macppc & MAXBSIZE < 64k & 2KB sector size devices == boom
To: None <gnats-bugs@gnats.netbsd.org>
From: None <mrg@eterna.com.au>
List: netbsd-bugs
Date: 03/30/2003 02:27:21
>Number: 20934
>Category: kern
>Synopsis: macppc & MAXBSIZE < 64k & 2KB sector size devices == boom
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Mar 29 08:28:01 PST 2003
>Closed-Date:
>Last-Modified:
>Originator: matthew green
>Release: NetBSD 1.6P
>Organization:
people's front against (bozotic) www (softwar foundation)
>Environment:
System: NetBSD splode.eterna.com.au 1.6P NetBSD 1.6P (_splode_) #30: Sat Mar 15 00:15:28 EST 2003 mrg@what-time-is-love.eterna.com.au:/var/_splode_ sparc64
Architecture: sparc
Machine: sparc64
>Description:
on a powermac G4 with a new dvdrom drive, i get panics in my kernel
if i set MAXBSIZE less than 64KB. i tracked this to macppc/disksubr.c
read_mac_label() calling geteblk() with sectorsize * 32, which with
the old 512 byte cdrw is 16KB, but with the new dvdrom it causes
allocbuf() to panic: allocbuf: buffer larger than MAXBSIZE requested.
this line is the culprit:
bp = geteblk((int)lp->d_secsize * NUM_PARTS);
>How-To-Repeat:
try to use a 2KB sector size device on a 16KB MAXBSIZE macppc machine.
>Fix:
rework mac_read_label() to keep buffers MAXBSIZE or smaller!
>Release-Note:
>Audit-Trail:
>Unformatted: