Subject: port-i386/4114: bus_space_map should check region bounds
To: None <>
From: Martin Husemann <>
List: netbsd-bugs
Date: 09/16/1997 10:23:52
>Number:         4114
>Category:       port-i386
>Synopsis:       bus_space_map panics with values outside some bus_space region
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Sep 16 02:05:01 1997
>Originator:     Martin Husemann
UP-Vision Computergrphik GmbH, Bad Arolsen
>Release:        September 03 1997
System: NetBSD 1.2G NetBSD 1.2G (RUMOLT) #1: Thu Aug 28 10:13:28 MEST 1997 i386


I have a card which maps multiple IO port ranges with fixed base offsets
from the given iobase. One of this offsets is negative, so the resulting
port no might end up negative. I think bus_space_map should silently fail
in this case (a case handled already in the probe/attach code), instead it
causes a panic in the extend manager. This would make driver code easier.

Of course I can (and now do) catch this in the bus specific attach code.


Let user specify bad iobase, see above.