Re: [PATCH] kasan: don't emit builtin calls when sanitization is off

2018-01-19 Thread Andrey Konovalov
On Fri, Jan 19, 2018 at 4:57 PM, Andrey Ryabinin wrote: > > > On 01/19/2018 05:54 PM, Andrey Konovalov wrote: > >> diff --git a/scripts/Makefile.kasan b/scripts/Makefile.kasan >> index dbbd4382f15a..db473309f136 100644 >> --- a/scripts/Makefile.kasan >> +++ b/scripts/Makefile.kasan >> @@ -39,4 +39

Re: [PATCH] kasan: don't emit builtin calls when sanitization is off

2018-01-19 Thread Andrey Ryabinin
On 01/19/2018 05:54 PM, Andrey Konovalov wrote: > diff --git a/scripts/Makefile.kasan b/scripts/Makefile.kasan > index dbbd4382f15a..db473309f136 100644 > --- a/scripts/Makefile.kasan > +++ b/scripts/Makefile.kasan > @@ -39,4 +39,7 @@ else > endif > > CFLAGS_KASAN += $(call cc-option, -fsani

[PATCH] kasan: don't emit builtin calls when sanitization is off

2018-01-19 Thread Andrey Konovalov
With KASAN enabled the kernel has two different memset() functions, one with KASAN checks (memset) and one without (__memset). KASAN uses some macro tricks to use the proper version where required. For example memset() calls in mm/slub.c are without KASAN checks, since they operate on poisoned slab