OpenSolaris

You are not signed in. Sign in or register.

Heads up: warlock

Date: Wed, 23 Nov 2005 11:21:10 -0800
From: frits vanderlinden <Frits dot Vanderlinden at Sun dot COM>
To: onnv-gate at onnv dot eng dot sun dot com
Subject: Heads up: warlock



my putback of

    6352154 warlock all is not clean


has cleaned up the warlocking that is done in

cd uts/sparc/warlock
make all

There are no longer any warnings or fatal errors.

warlock is a tool for static locking analysis. It is very good
in finding recursive mutex problems, exiting a function without
releasing a mutex, releasing a mutex that was not held, and
acquiring multiple locks in inconsistent order resulting in
deadlocks.

For more information on warlock: 

http://suntools.eng/tools/internal/

(add /net/suntools.central/export/tools/sparc/bin to your $PATH)

warlock was developed in 1992 (IIRC) by nicholas sterling 
but never productized (a subset (locklint) was).

I have been using warlock in all of my projects since the
early nineties. 

Warlock is unsupported and runs on sparc only. 
It has found very embarrassing locking problems in
many subsystems and drivers over the years.

(this does not mean that it cannot warlock x86-only
drivers.  You just need to create a build directory under
uts/sparc with a Makefile with the warlock rules (and
if you putback this Makefile, don't forget to add it to
the list of unreferenced files))

Particulary interesting is the warlocking of sd. 
After first warlocking sd.c on its own, it is then 
warlocked with a number of HBA drivers and the SCSA layer:

cd uts/sparc/sd
make warlock


The following modules and drivers were warlocked in the 
past but recent putbacks broke the warlocking of some:


- USB:  usba, ohci, uhci, ehci, hid, scsa2usb, usb_ac, 
	usb_as, ugen, usb_mid, usbprn, usbser, usbser_edge,
	usbsksp, usbsprl, usbskel

- SCSI:	dad, dada, esp, fas, glm, ifp, isp, sd, ses, st, ssd
	uata

- 1394: s1394, hci1394, scsa1394

- parallel port:  ecpp

- audio: audiosup, mixer, amsrc1, amsr2, audio1575, audio810,
	audiovia823x, audiocs, audioens, audiots

- smartcard: scmi2c

- infiniband: ibmf, tavor, ib, ibtl, ibcm, ibd

If you make changes in any of these modules, please run 
warlock all *before* you start testing. It will save you 
time.

Note that warlocking is not (yet) part of nightly builds.

cheers

fritS