lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 13 Apr 2018 22:16:30 +0300
From:   Andrey Ryabinin <aryabinin@...tuozzo.com>
To:     Andrey Konovalov <andreyknvl@...gle.com>
Cc:     Alexander Potapenko <glider@...gle.com>,
        Dmitry Vyukov <dvyukov@...gle.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        David Rientjes <rientjes@...gle.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...nel.org>,
        David Woodhouse <dwmw@...zon.co.uk>,
        Will Deacon <will.deacon@....com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Paul Lawrence <paullawrence@...gle.com>,
        Sandipan Das <sandipan@...ux.vnet.ibm.com>,
        Kees Cook <keescook@...omium.org>,
        LKML <linux-kernel@...r.kernel.org>,
        kasan-dev <kasan-dev@...glegroups.com>,
        Linux Memory Management List <linux-mm@...ck.org>,
        Kostya Serebryany <kcc@...gle.com>
Subject: Re: [PATCH] kasan: add no_sanitize attribute for clang builds



On 04/13/2018 08:34 PM, Andrey Konovalov wrote:
> On Fri, Apr 13, 2018 at 5:31 PM, Andrey Ryabinin
> <aryabinin@...tuozzo.com> wrote:
>>
>>
>> On 04/12/2018 08:29 PM, Andrey Konovalov wrote:
>>> KASAN uses the __no_sanitize_address macro to disable instrumentation
>>> of particular functions. Right now it's defined only for GCC build,
>>> which causes false positives when clang is used.
>>>
>>> This patch adds a definition for clang.
>>>
>>> Note, that clang's revision 329612 or higher is required.
>>>
>>> Signed-off-by: Andrey Konovalov <andreyknvl@...gle.com>
>>> ---
>>>  include/linux/compiler-clang.h | 5 +++++
>>>  1 file changed, 5 insertions(+)
>>>
>>> diff --git a/include/linux/compiler-clang.h b/include/linux/compiler-clang.h
>>> index ceb96ecab96e..5a1d8580febe 100644
>>> --- a/include/linux/compiler-clang.h
>>> +++ b/include/linux/compiler-clang.h
>>> @@ -25,6 +25,11 @@
>>>  #define __SANITIZE_ADDRESS__
>>>  #endif
>>>
>>> +#ifdef CONFIG_KASAN
>>
>> If, for whatever reason, developer decides to add __no_sanitize_address to some
>> generic function, guess what will happen next when he/she will try to build CONFIG_KASAN=n kernel?
> 
> It's defined to nothing in compiler-gcc.h and redefined in
> compiler-clang.h only if CONFIG_KASAN is enabled, so everything should
> be fine. Am I missing something?

No, It's was me missing something ;)
However, "#ifdef CONFIG_KASAN" seems to be redundant, I'd rather remove it.

Anyway:
	Acked-by: Andrey Ryabinin <aryabinin@...tuozzo.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ