OpenSolaris

  subsites   code review   repo   packages   bugs   defect   polls   planet
You are not signed in. Sign in or register.

Heads up: warlock (a friendly reminder)

Date: Mon, 30 Oct 2006 12:10:52 -0800
From: frits vanderlinden <frits at sun dot com>
To: onnv-gate at onnv dot eng dot sun dot com
Subject: Heads up: warlock (a friendly reminder)


If you are not not working drivers, you can probably delete this message 
(which I have also sent in november 2005. Unfortunately warlocking was 
broken again recently and I fixed it again)

If you touch a driver that might have been warlocked, please run before 
you putback:

cd uts/sparc/warlock
make all

There should be no 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

- sata drivers

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