From 2a16acac57c6ad3936cec05e8ce315359c5cb7c9 Mon Sep 17 00:00:00 2001 From: anton <> Date: Sun, 19 Aug 2018 11:42:33 +0000 Subject: [PATCH] Add kcov(4), a kernel code coverage tracing driver. It's used in conjunction with the syzkaller kernel fuzzer. So far, 8 distinct panics have been found and fixed. This effort will continue. kcov is limited to architectures using Clang as their default compiler and is not enabled by default. With help from mpi@, thanks! ok kettenis@ mpi@ visa@ --- src/etc/MAKEDEV.common | 5 ++++- src/etc/etc.amd64/MAKEDEV.md | 3 ++- src/etc/etc.i386/MAKEDEV.md | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/etc/MAKEDEV.common b/src/etc/MAKEDEV.common index db19b2d4..1631f1b9 100644 --- a/src/etc/MAKEDEV.common +++ b/src/etc/MAKEDEV.common @@ -1,4 +1,4 @@ -vers(a, {-$OpenBSD: MAKEDEV.common,v 1.99 2018/07/28 08:09:50 ratchov Exp $-})dnl +vers(a, {-$OpenBSD: MAKEDEV.common,v 1.100 2018/08/19 11:42:33 anton Exp $-})dnl dnl dnl Copyright (c) 2001-2006 Todd T. Fries dnl @@ -167,6 +167,7 @@ target(all, fuse)dnl target(all, vmm)dnl target(all, pvbus, 0, 1)dnl target(all, bpf)dnl +target(all, kcov)dnl dnl _mkdev(all, {-all-}, {-dnl show_target(all)dnl @@ -521,3 +522,5 @@ _mkdev(vmm, vmm, {-M vmm c major_vmm_c 0 600-})dnl __devitem(pvbus, pvbus*, paravirtual device tree root)dnl _mkdev(pvbus, {-pvbus*-}, {-M pvbus$U c major_pvbus_c $U 640-}, 640)dnl _mkdev(local, local, {-test -s $T.local && sh $T.local-})dnl +__devitem(kcov, kcov, Kernel code coverage tracing)dnl +_mkdev(kcov, kcov, {-M kcov c major_kcov_c 0 600-})dnl diff --git a/src/etc/etc.amd64/MAKEDEV.md b/src/etc/etc.amd64/MAKEDEV.md index cd915ec3..1aa4f673 100644 --- a/src/etc/etc.amd64/MAKEDEV.md +++ b/src/etc/etc.amd64/MAKEDEV.md @@ -1,6 +1,6 @@ define(MACHINE,amd64)dnl vers(__file__, - {-$OpenBSD: MAKEDEV.md,v 1.69 2016/09/11 19:59:53 deraadt Exp $-}, + {-$OpenBSD: MAKEDEV.md,v 1.70 2018/08/19 11:42:33 anton Exp $-}, etc.MACHINE)dnl dnl dnl Copyright (c) 2001-2006 Todd T. Fries @@ -77,6 +77,7 @@ _DEV(hotplug, 82) _DEV(ipmi, 96) dnl _DEV(joy, 26) _DEV(nvram, 85) +_DEV(kcov, 19) _DEV(pci, 72) _DEV(pctr, 46) _DEV(pf, 73) diff --git a/src/etc/etc.i386/MAKEDEV.md b/src/etc/etc.i386/MAKEDEV.md index c7f74ee5..a06b5039 100644 --- a/src/etc/etc.i386/MAKEDEV.md +++ b/src/etc/etc.i386/MAKEDEV.md @@ -1,6 +1,6 @@ define(MACHINE,i386)dnl vers(__file__, - {-$OpenBSD: MAKEDEV.md,v 1.83 2016/09/11 19:59:53 deraadt Exp $-}, + {-$OpenBSD: MAKEDEV.md,v 1.84 2018/08/19 11:42:33 anton Exp $-}, etc.MACHINE)dnl dnl dnl Copyright (c) 2001-2006 Todd T. Fries @@ -78,6 +78,7 @@ _DEV(gpr, 80) _DEV(hotplug, 82) _DEV(ipmi, 96) _DEV(joy, 26) +_DEV(kcov, 19) _DEV(nvram, 84) _DEV(pci, 72) _DEV(pctr, 46)