Messages in this thread |  | | Date | Tue, 21 Oct 2014 10:06:25 -0700 | From | Randy Dunlap <> | Subject | Re: [RFC PATCH] UBSan: run-time undefined behavior sanity checker |
| |
On 10/20/14 03:54, Andrey Ryabinin wrote: > > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug > index 4e35a5d..7dc9b89 100644 > --- a/lib/Kconfig.debug > +++ b/lib/Kconfig.debug > @@ -646,6 +646,29 @@ config DEBUG_SHIRQ > Drivers ought to be able to handle interrupts coming in at those > points; some don't and need to be caught. > > +config HAVE_ARCH_UBSAN_SANTIZE_ALL > + bool > + > +config UBSAN > + bool "Undefined behaviour sanity checker" > + help > + This option enables undefined behaviour sanity checker
checker.
> + Compile-time instrumentataion used to detect various undefined
instrumentation is used
> + behaviours in runtime. Different kinds of checks could be enabled
prefer: may be enabled
> + via boot parameter ubsan_handle (see: Documentation/ubsan.txt). > + (TODO: write docs). > + > +config UBSAN_SANITIZE_ALL > + bool "Enable instrumentation for the entire kernel" > + depends on UBSAN > + depends on HAVE_ARCH_UBSAN_SANTIZE_ALL > + default y > + help > + This option acitivates instrumentation for the entire kernel.
activates
> + If you don't enable this option, you have to explicitly specify > + UBSAN_SANITIZE := y for the files/directories you want to check for UB. > + > + > menu "Debug Lockups and Hangs" > > config LOCKUP_DETECTOR
-- ~Randy
|  |