On Thu, 27 Nov 2014, Andrey Ryabinin wrote: > diff --git a/Documentation/kasan.txt b/Documentation/kasan.txt > new file mode 100644 > index 0000000..a3a9009 > --- /dev/null > +++ b/Documentation/kasan.txt > @@ -0,0 +1,169 @@ > +Kernel address sanitizer > +================ > + > +0. Overview > +=========== > + > +Kernel Address sanitizer (KASan) is a dynamic memory error detector. It > provides > +a fast and comprehensive solution for finding use-after-free and > out-of-bounds > +bugs. > + > +KASan uses compile-time instrumentation for checking every memory access, > +therefore you will need a certain version of GCC >= 4.9.2 > + > +Currently KASan is supported only for x86_64 architecture and requires that > the > +kernel be built with the SLUB allocator. > + > +1. Usage > +========= > + > +To enable KASAN configure kernel with: > + > + CONFIG_KASAN = y > + > +and choose between CONFIG_KASAN_OUTLINE and CONFIG_KASAN_INLINE. > Outline/inline > +is compiler instrumentation types. The former produces smaller binary the > +latter is 1.1 - 2 times faster. Inline instrumentation requires GCC 5.0 or > +latter. > + > +Currently KASAN works only with the SLUB memory allocator. > +For better bug detection and nicer report, enable CONFIG_STACKTRACE and put > +at least 'slub_debug=U' in the boot cmdline. > + > +To disable instrumentation for specific files or directories, add a line > +similar to the following to the respective kernel Makefile: > + > + For a single file (e.g. main.o): > + KASAN_SANITIZE_main.o := n > + > + For all files in one directory: > + KASAN_SANITIZE := n > +
More precisely, this requires CONFIG_SLUB_DEBUG and not just CONFIG_SLUB. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/