Linux Driver Revisions
for Regression Verification
ESEC/FSE Evaluated Artifact Collection

Dirk Beyer, Stefan Löwe, Evgeny Novikov, Andreas Stahlbauer, and Philipp Wendler

Abstract

We contribute a set of benchmark verification tasks that can be used to experimentally evaluate the impact of regression-checking techniques on industrial verification problems. The verification tasks were constructed from 62 device drivers with 1119 revisions as included in the Linux kernel. The safety properties are encoded as reachability problems in the verification tasks. We used this set of verification tasks to evaluate the technique of precision reuse for more efficient regression verification in our paper at ESEC/FSE 2013.

This collection of verification tasks was used for experimental evaluation in our ESEC/FSE 2013 paper on "Precision Reuse for Efficient Regression Verification". The tool implementation and the full benchmark results are available on the supplementary web page.

Verification Tasks

The verification tasks have been extracted from the Linux kernel repository (Git repository) using the infrastructure of the Linux Driver Verification (LDV) project. Only commits to the mainline branch were considered. Merge commits that reintegrated branches were considered, and thus no changes are lost. The oldest revisions date back to the year 2007, and the most recent revisions to the end of 2012. The verification tasks are given in GNU C; the files were post-processed using CIL (C Intermediate Language).

Availability

The verification tasks are publicly available in a Git repository at GitLab. The complete set is provided

The verification tasks are released under GPL v2.

Structure of Repository

The verification tasks (in directory 'regression-verification-tasks') are organized in one directory for each device driver. The file name of each verification task has the following format: RevisionOrder.AbbreviatedCommitHash.Specification.cil_Verdict.i

RevisionOrder: Total order of the revisions; describes in which order the revisions should be verified
AbbreviatedCommitHash: Unique identifier of the revision
(see documentation [1] [2] for git log --abbrev-commit)
Specification: Specification that has been encoded into the verification task as reachability problem
Verdict: Reference verdict that states whether the specification is violated (unsafe) or not (safe)

The repository contains a total of 4521 verification tasks, of which CPAchecker found 103 to be unsafe and 4276 to be safe (for the remaining 142 verification tasks, the verifier could not determine a verification result).

Specifications

The safety properties to check have been encoded as reachability problems into the verification tasks. If the program location labeled with LDV_ERROR is reachable, then the property is violated (a counterexample is found). Table 1 describes all the specifications that have been encoded into the verification tasks. A detailed description of the rules can be found on the website of the Linux Driver Verification project.
Table 1: Considered specifications
NameDescription
08_1aFor each successful call to try_module_get(), a corresponding call to module_put() that unblocks the module must exist.
32_1A less accurate implementation of specification 32_7a.
32_7aA mutex must not be acquired or released twice. A mutex must not be released without prior acquiring. Finally, all mutexes must be released.
39_7aA spin lock must not be acquired or released twice. A spin lock must not be released without prior acquiring. Finally, all spin locks must be released.
43_1aThe flag for atomic allocation operations must be used whenever a memory-allocation function is called while a spin lock is held.
68_1For each allocation of an USB Request Block (URB) using usb_alloc_urb(), a corresponding call to usb_free_urb() must exist.

Entry Function

The name of the entry (main) function of the verification task is either ldv_main0_sequence_infinite_withcheck_stateful or ldv_main1_sequence_infinite_withcheck_stateful.

Drivers

Table 2 gives a short overview of all drivers for which verification tasks are included. Each directory in the repository corresponds to one driver. Slashes (/) were replaced by double-dashes (--) in names of the directories in the repository.

Table 2: Considered drivers
DriverRevisionsCovered Driver Source Files
auxdisplay/cfag12864b.ko4auxdisplay/cfag12864b.c
block/drbd/drbd.ko158block/drbd/{ drbd_bitmap.c, drbd_proc.c, drbd_worker.c, drbd_receiver.c, drbd_req.c, drbd_actlog.c, drbd_main.c, drbd_strings.c, drbd_nl.c }
block/paride/pt.ko12block/paride/pt.c
cpufreq/pcc-cpufreq.ko3cpufreq/pcc-cpufreq.c
gpu/drm/i2c/sil164.ko3gpu/drm/i2c/sil164_drv.c
gpu/drm/i915/i915.ko79gpu/drm/i915/{ i915_drv.c, i915_dma.c, i915_irq.c, i915_debugfs.c, i915_suspend.c, i915_gem.c, i915_gem_debug.c, i915_gem_evict.c, i915_gem_execbuffer.c, i915_gem_gtt.c, i915_gem_stolen.c, i915_gem_tiling.c, i915_sysfs.c, i915_trace_points.c, intel_display.c, intel_crt.c, intel_lvds.c, intel_bios.c, intel_ddi.c, intel_dp.c, intel_hdmi.c, intel_sdvo.c, intel_modes.c, intel_panel.c, intel_pm.c, intel_i2c.c, intel_fb.c, intel_tv.c, intel_dvo.c, intel_ringbuffer.c, intel_overlay.c, intel_sprite.c, intel_opregion.c, dvo_ch7xxx.c, dvo_ch7017.c, dvo_ivch.c, dvo_tfp410.c, dvo_sil164.c, i915_gem_dmabuf.c, i915_ioc32.c, intel_acpi.c }
hwmon/ads7871.ko10hwmon/ads7871.c
hwmon/it87.ko59hwmon/it87.c
i2c/algos/i2c-algo-pca.ko14i2c/algos/i2c-algo-pca.c
input/joystick/magellan.ko2input/joystick/magellan.c
input/joystick/spaceorb.ko2input/joystick/spaceorb.c
input/joystick/twidjoy.ko2input/joystick/twidjoy.c
input/misc/keyspan_remote.ko9input/misc/keyspan_remote.c
input/mouse/vsxxxaa.ko4input/mouse/vsxxxaa.c
isdn/mISDN/mISDN_core.ko59isdn/mISDN/{ core.c, fsm.c, socket.c, clock.c, hwchannel.c, stack.c, layer1.c, layer2.c, tei.c, timerdev.c }
leds/leds-bd2802.ko14leds/leds-bd2802.c
media/common/tuners/mt2266.ko5media/common/tuners/mt2266.c
media/dvb/dvb-usb/dvb-usb-az6007.ko5media/dvb/dvb-usb/az6007.c
media/dvb/dvb-usb/dvb-usb-rtl28xxu.ko10media/dvb/dvb-usb/rtl28xxu.c
media/dvb/dvb-usb/dvb-usb-vp7045.ko12media/dvb/dvb-usb/{ vp7045.c, vp7045-fe.c }
media/dvb/frontends/cxd2820r.ko23media/dvb/frontends/{ cxd2820r_core.c, cxd2820r_c.c, cxd2820r_t.c, cxd2820r_t2.c }
media/dvb/ttpci/budget-patch.ko9media/dvb/ttpci/budget-patch.c
media/video/cx231xx/cx231xx-dvb.ko13media/video/cx231xx/cx231xx-dvb.c
media/video/videobuf-vmalloc.ko31media/video/videobuf-vmalloc.c
message/i2o/i2o_scsi.ko7message/i2o/i2o_scsi.c
mfd/janz-cmodio.ko11mfd/janz-cmodio.c
mtd/ar7part.ko6mtd/ar7part.c
mtd/devices/slram.ko9mtd/devices/slram.c
mtd/maps/intel_vr_nor.ko10mtd/maps/intel_vr_nor.c
mtd/mtdoops.ko41mtd/mtdoops.c
net/arcnet/com20020_cs.ko2net/arcnet/com20020_cs.c
net/can/usb/ems_usb.ko21net/can/usb/ems_usb.c
net/phy/dp83640.ko16net/phy/dp83640.c
net/phy/spi_ks8995.ko4net/phy/spi_ks8995.c
net/tokenring/abyss.ko4net/tokenring/abyss.c
net/usb/catc.ko22net/usb/catc.c
net/wan/farsync.ko22net/wan/farsync.c
net/wireless/wl12xx/wl12xx_sdio.ko38net/wireless/wl12xx/sdio.c
platform/x86/panasonic-laptop.ko16platform/x86/panasonic-laptop.c
regulator/gpio-regulator.ko20regulator/gpio-regulator.c
regulator/wm831x-dcdc.ko34regulator/wm831x-dcdc.c
rtc/rtc-m41t93.ko6rtc/rtc-m41t93.c
rtc/rtc-max6902.ko9rtc/rtc-max6902.c
rtc/rtc-pcf2123.ko9rtc/rtc-pcf2123.c
scsi/dmx3191d.ko2scsi/dmx3191d.c
scsi/pcmcia/sym53c500_cs.ko20scsi/pcmcia/sym53c500_cs.c
staging/comedi/drivers/adl_pci7432.ko13staging/comedi/adl_pci7432.c
staging/comedi/drivers/comedi_bond.ko13staging/comedi/comedi_bond.c
target/loopback/tcm_loop.ko41target/loopback/tcm_loop.c
tty/serial/uartlite.ko9tty/serial/uartlite.c
tty/serial/xilinx_uartps.ko3tty/serial/xilinx_uartps.c
uio/uio_sercos3.ko5uio/uio_sercos3.c
usb/otg/ab8500-usb.ko6usb/otg/ab8500-usb.c
usb/serial/cp210x.ko71usb/serial/cp210x.c
usb/serial/metro-usb.ko25usb/serial/metro-usb.c
usb/serial/mos7840.ko60usb/serial/mos7840.c
usb/serial/spcp8x5.ko37usb/serial/spcp8x5.c
usb/serial/ssu100.ko28usb/serial/ssu100.c
video/arkfb.ko22video/arkfb.c
video/backlight/lms283gf05.ko13video/backlight/lms283gf05.c
video/backlight/tdo24m.ko12video/backlight/tdo24m.c
video/matrox/i2c-matroxfb.ko7video/matrox/i2c-matroxfb.c

Original Source Code

To obtain the original source code, one needs to clone the Git repository of the Linux kernel (or open it via browser), checkout the desired revision using the "AbbreviatedCommitHash" (or open in browser by means of setting "AbbreviatedCommitHash" in a link, e.g., http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=30b743a), and choose one of C source file he/she is interested in. The verification tasks contain #line preprocessor directives that reference the files and line numbers from the original source code.