From curt@tkg.com  Tue Dec 17 17:06:49 1996
Received: from westlake.tkg.com (westlake.tkg.com [198.3.130.68])
          by freefall.freebsd.org (8.8.4/8.8.4) with ESMTP id RAA05461
          for <freebsd-gnats-submit@freebsd.org>; Tue, 17 Dec 1996 17:06:48 -0800 (PST)
Received: from spycam.tkg.com (spycam.tkg.com [198.3.130.106]) by westlake.tkg.com (8.7.5/8.7.3) with SMTP id TAA08926; Tue, 17 Dec 1996 19:04:54 -0600 (CST)
Message-Id: <Pine.A32.3.91.961217190155.44480A-100000@spycam.tkg.com>
Date: Tue, 17 Dec 1996 19:04:53 -0600 (CST)
From: Curt Finch <curt@tkg.com>
To: Joerg Wunsch <joerg_wunsch@uriah.heep.sax.de>
Cc: freebsd-gnats-submit@freebsd.org
In-Reply-To: <199612172319.AAA18313@uriah.heep.sax.de>
Subject: Re: ill-defined mouse device crashes system

>Number:         2238
>Category:       kern
>Synopsis:       Re: ill-defined mouse device crashes system
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    joerg
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Dec 17 17:10:01 PST 1996
>Closed-Date:    Mon Dec 23 20:13:49 MET 1996
>Last-Modified:  Mon Dec 23 20:14:38 MET 1996
>Originator:     
>Release:        
>Organization:
>Environment:
>Description:
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: joerg 
State-Changed-When: Mon Dec 23 20:13:49 MET 1996 
State-Changed-Why:  
This is a duplicate for PR # bin/2226, and has already been closed. 



Responsible-Changed-From-To: gnats-admin->joerg 
Responsible-Changed-By: joerg 
Responsible-Changed-When: Mon Dec 23 20:13:49 MET 1996 
Responsible-Changed-Why:  
Misfiled to gnats-admin 
I've fixed the bug already. 
>Unformatted:
On Wed, 18 Dec 1996, J Wunsch wrote:

> As curt@tkg.com wrote:
> 
> > i had a ps/2 mouse.  even though dmesg said it was not detected, a
> > /dev/mse0 device was created.  'cat /dev/mse0' crashes the machine.
> > 
> > such user command should not be able to crash the system if we want
> > freebsd to achieve a reputation of robustness.
> 
> I think the `mse' driver is very good in misdetecting foreign
> hardware...  Can you quote its boot message, too?  (mse0: ...)

mse0 not found at 0x23c

the dump and /unix are available if you wish from 
ftp.tkg.com//private/curt
12.9megs


> 
> Basically, it's the same old evil that you can't reliable probe most
> PC hardware on the ISA bus.  (EISA and PCI are way better.)
> 
> > maybe spec_open() needs to be a little more careful?  not sure.
> 
> Nothing with spec_open().  It simply passes the request on to the mse
> driver.  Of course, since there isn't really an mse-style mouse (but
> the driver's probe routine initially thought there were one), it gets
> confused.
> 
> > #4  0xf01a7563 in trap (frame={tf_es = 16, tf_ds = -257425392, tf_edi = 27, 
> >       tf_esi = -1073545062, tf_ebp = -272630344, tf_isp = -272630380, 
> >       tf_ebx = -2147483648, tf_edx = 0, tf_ecx = -266316512, tf_eax = 0, 
> >       tf_trapno = 12, tf_err = 0, tf_eip = 0, tf_cs = 8, tf_eflags = 78470, 
> >       tf_esp = -266598368, tf_ss = 0}) at ../../i386/i386/trap.c:310
> > #5  0xf019d451 in calltrap ()
> 
> See the section about kernel debugging in the handbook for how to
> uncover the real location of the error.  It's hidden in a trap frame.
> 
> Basically:
> 
> (gdb) up 4
> (gdb) frame frame->tf_ebp frame->tf_eip
> 
> This should tell you where exactly the crash happened (inside
> mseopen(), one would think).  You can help us by quoting this spot,
> and perhaps values of related variables that are likely to have caused
> the page fault.
> 
> Of course, you could help us even more by discovering how to
> distinguish your hardware from a real mse mouse... but that's probably
> not that easy.  Wait... mse by default probes at address 0x23c, that's
> a very weird one.  Do you perchance know which device in your machine
> might sit at this address?  That's probably the culprit that finally
> fooled the mse device probe.
> 
> -- 
> cheers, J"org
> 
> joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
> Never trust an operating system you don't have sources for. ;-)
> 


--
Curt Finch - The Kernel Group Inc. - curt@tkg.com - (512)433-3333
  Tools and Consulting for AIX and Beyond - http://www.TKG.com/

