NetBSD/sys
kamil 0fe7e51662 Add KCOV - kernel code coverage tracing device
The KCOV driver implements collection of code coverage inside the kernel.
It can be enabled on a per process basis from userland, allowing the kernel
program counter to be collected during syscalls triggered by the same
process.

The device is oriented towards kernel fuzzers, in particular syzkaller.

Currently the only supported coverage type is -fsanitize-coverage=trace-pc.

The KCOV driver was initially developed in Linux. A driver based on the
same concept was then implemented in FreeBSD and OpenBSD.

Documentation is borrowed from OpenBSD and ATF tests from FreeBSD.

This patch has been prepared by Siddharth Muralee, improved by <maxv>
and polished by myself before importing into the mainline tree.

All ATF tests pass.
2019-02-23 03:10:05 +00:00
..
altq
arch Add KCOV - kernel code coverage tracing device 2019-02-23 03:10:05 +00:00
coda
compat include libkern.h or strings.h. should fix i386 build issues. 2019-02-21 08:25:00 +00:00
conf Add KCOV - kernel code coverage tracing device 2019-02-23 03:10:05 +00:00
crypto add fallthru comments. i considered patching makefiles to ignore 2019-02-04 08:23:53 +00:00
ddb - add or adjust /* FALLTHROUGH */ where appropriate 2019-02-03 03:19:25 +00:00
dev Fix omission: if we receive a guest trap on CR0, and if the original 2019-02-22 12:24:34 +00:00
dist/pf
external revert the upsteam portion of previous; we don't want to patch upstream 2019-02-19 00:30:16 +00:00
fs Set "mnt_lower" before the first file system operation on the new file system. 2019-02-20 10:05:59 +00:00
gdbscripts
kern Add KCOV - kernel code coverage tracing device 2019-02-23 03:10:05 +00:00
lib don't use -fnon-call-exceptions on arm. not needed and triggers eh_frame generation. 2019-02-07 10:44:54 +00:00
miscfs Attach "mnt_transinfo" to "dead_rootmount" so every mount has a 2019-02-20 10:07:27 +00:00
modules WARNS=3 for compat_netbsd32_* in order to appease sign-compare warnings 2019-02-20 05:11:30 +00:00
net revert previous. we don't want to change upstream code. 2019-02-19 00:26:57 +00:00
net80211 Normalize all the compat hooks' names to the form 2019-01-29 09:28:50 +00:00
netatalk Fix memory leaks pointed out by Ilja Van Sprundel: all 2019-01-28 12:53:01 +00:00
netbt - add or adjust /* FALLTHROUGH */ where appropriate 2019-02-03 03:19:25 +00:00
netcan
netinet This really was a missing break. 2019-02-15 14:13:32 +00:00
netinet6 adjust fallthru comments to appease gcc7. 2019-02-05 04:48:47 +00:00
netipsec Merge the [pgoyette-compat] branch 2019-01-27 02:08:33 +00:00
netmpls Fix memory leaks pointed out by Ilja Van Sprundel: all 2019-01-28 12:53:01 +00:00
netsmb
nfs Bracket do_sys_renameat() and nfsrv_rename() with fstrans. 2019-02-20 10:05:20 +00:00
opencrypto Merge the [pgoyette-compat] branch 2019-01-27 02:08:33 +00:00
rump Attach "mnt_transinfo" to "dead_rootmount" so every mount has a 2019-02-20 10:07:27 +00:00
secmodel
stand
sys Add KCOV - kernel code coverage tracing device 2019-02-23 03:10:05 +00:00
ufs Remove superfluous VOP_UNLOCK(), vnode will be unlocked from spec_reclaim(). 2019-02-20 10:03:55 +00:00
uvm VM_MAXUSER_ADDRESS can be undefined when compiling module/coredump; 2019-02-17 13:46:03 +00:00
Makefile