cd linux
grep -rn PCI_DEVICE drivers/net/wireless
Choose one that you want to test
In Kconfig, find the corresponding CONFIG flag. Add the following to Makefile.
KCOV_INSTRUMENT := y
ccflags-y += -fno-reorder-functions
cd Drifuzz
# Add new CONFIG_{DRIVER}=m to build as loadable module
vim linux-module-build/.config
# Rememebr *.ko created
./compile.sh --build-module
./compile.sh --build-image
- Create file
panda/drifuzz/hw/{DRIVER}.c
- Add an entry to
panda/drifuzz/hw/Makefile.objs
- Add the name to
panda/hw/pci/pci.c
'spci_nic_models
andpci_nic_names
lists
cd Drifuzz
./compile.sh --build-panda
./snapshot_helper.py {DRIVER}
Run the following command. It should generate inputs with flipped branches in work/{DRIVER}/out
.
./concolic.py {DRIVER} {INPUT}
./search_group.py {DRIVER} {INPUT}