From 9d3f6209bf2cc73cc584b44e5b0569663fe76c8f Mon Sep 17 00:00:00 2001 From: David Drysdale Date: Wed, 16 Dec 2015 09:47:38 +0000 Subject: Mention need for mounted debugfs --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 7617bc2b8..d9b7cff28 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,8 @@ In particular: $SSHID -p $PORT root@localhost` without being prompted for a password (where `SSHID` is the SSH identification file and `PORT` is the port that are specified in the `manager` configuration file). + - The kernel exports coverage information via a debugfs entry, so the VM image needs to mount + the debugfs filesystem at `/sys/kernel/debug`. TODO: Describe how to support other types of VM other than QEMU. -- cgit mrf-deployment From 6b2d1faa493a84ed230d7e255dbc7cfc609106dd Mon Sep 17 00:00:00 2001 From: David Drysdale Date: Wed, 16 Dec 2015 10:05:54 +0000 Subject: Cope with missing /sys/kernel/debug/kmemleak If the kernel under test has not been built with kmemleak support, then the debugfs file will not exist. If memory leak detection is not turned on, then keep going in this situation. --- fuzzer/fuzzer.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fuzzer/fuzzer.go b/fuzzer/fuzzer.go index f71b2d90f..f85a59a64 100644 --- a/fuzzer/fuzzer.go +++ b/fuzzer/fuzzer.go @@ -518,8 +518,10 @@ func (g *Gate) Leave(idx int) { func kmemleakInit() { fd, err := syscall.Open("/sys/kernel/debug/kmemleak", syscall.O_RDWR, 0) if err != nil { - if !*flagLeak { + if *flagLeak { panic(err) + } else { + return } } defer syscall.Close(fd) -- cgit mrf-deployment