Subject: port-i386/1112: psl.h change to i386 breaks swapping
To: None <gnats-admin@sun-lamp.cs.berkeley.edu>
From: John Kohl <jtk@kolvir.blrc.ma.us>
List: netbsd-bugs
Date: 06/04/1995 16:05:09
>Number:         1112
>Category:       port-i386
>Synopsis:       psl.h changed the number of interrupt masks but didn't allocate space!
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jun  4 16:05:03 1995
>Originator:     John Kohl
>Organization:
NetBSD Kernel Hackers `R` Us
>Release:        NetBSD-current, 04 June 1995
>Environment:
	
System: NetBSD kolvir 1.0A NetBSD 1.0A (KOLVIR) #440: Sun Jun 4 00:50:51 EDT 1995 jtk@kolvir:/u1/NetBSD-current/src/sys/arch/i386/compile/KOLVIR i386


>Description:
psl.h added a new IPL_IMP, but didn't add space to imask[].  In my
kernel, the next symbol after imask[] is swcleanlist, which gets
trashed.  The first time swapping happens, the machine dies with a
kernel protection fault (bogus address dereference).

>How-To-Repeat:
Build new kernel, stress the system to swap.

>Fix:
===================================================================
RCS file: RCS/psl.h,v
retrieving revision 1.4
diff -c -r1.4 psl.h
*** psl.h	1995/06/04 14:12:07	1.4
--- psl.h	1995/06/04 22:29:04
***************
*** 98,104 ****
  
  #ifndef LOCORE
  
! int cpl, ipending, astpending, imask[4];
  
  /*
   * Add a mask to cpl, and return the old value of cpl.
--- 98,104 ----
  
  #ifndef LOCORE
  
! int cpl, ipending, astpending, imask[5];
  
  /*
   * Add a mask to cpl, and return the old value of cpl.
>Audit-Trail:
>Unformatted: