Thread (10 messages) 10 messages, 6 authors, 2016-02-04

[PATCH v6] kernel: add kcov code coverage

From: ryabinin.a.a@gmail.com (Andrey Ryabinin)
Date: 2016-02-02 16:02:53
Also in: lkml

2016-01-25 16:00 GMT+03:00 Dmitry Vyukov [off-list ref]:
quoted hunk ↗ jump to hunk
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index ecb9e75..cde6bd1 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -678,6 +678,26 @@ config DEBUG_STACKOVERFLOW

          If in doubt, say "N".

+config ARCH_HAS_KCOV
+       bool
+       help
+         KCOV does not have any arch-specific code, but currently it is enabled
+         only for x86_64. KCOV requires testing on other archs, and most likely
+         disabling of instrumentation for some early boot code.
+
+config KCOV
+       bool "Code coverage for fuzzing"
+       depends on ARCH_HAS_KCOV
I think we should select DEBUG_FS here, since this useless without it.
Also you placed this into 'Memory Debugging' submenu which seems wrong.
+       help
+         KCOV exposes kernel code coverage information in a form suitable
+         for coverage-guided fuzzing (randomized testing).
+
+         If RANDOMIZE_BASE is enabled, PC values will not be stable across
+         different machines and across reboots. If you need stable PC values,
+         disable RANDOMIZE_BASE.
+
+         For more details, see Documentation/kcov.txt.
+
 source "lib/Kconfig.kmemcheck"
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help