From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f71.google.com (mail-pg0-f71.google.com [74.125.83.71]) by kanga.kvack.org (Postfix) with ESMTP id 0986B6B0003 for ; Mon, 4 Jun 2018 06:28:03 -0400 (EDT) Received: by mail-pg0-f71.google.com with SMTP id 69-v6so7055237pgg.0 for ; Mon, 04 Jun 2018 03:28:03 -0700 (PDT) Received: from smtp.codeaurora.org (smtp.codeaurora.org. [198.145.29.96]) by mx.google.com with ESMTPS id x1-v6si45833765plb.8.2018.06.04.03.28.01 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Jun 2018 03:28:02 -0700 (PDT) Subject: Re: [PATCH v2 03/16] khwasan: add CONFIG_KASAN_GENERIC and CONFIG_KASAN_HW References: <2ef4932c434047ca5a2062782206b4163263dc57.1527259068.git.andreyknvl@google.com> From: Chintan Pandya Message-ID: Date: Mon, 4 Jun 2018 15:57:38 +0530 MIME-Version: 1.0 In-Reply-To: <2ef4932c434047ca5a2062782206b4163263dc57.1527259068.git.andreyknvl@google.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Andrey Konovalov , Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , Jonathan Corbet , Catalin Marinas , Will Deacon , Christopher Li , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Masahiro Yamada , Michal Marek , Mark Rutland , Nick Desaulniers , Yury Norov , Marc Zyngier , Kristina Martsenko , Suzuki K Poulose , Punit Agrawal , Dave Martin , Ard Biesheuvel , James Morse , Michael Weiser , Julien Thierry , Tyler Baicar , "Eric W . Biederman" , Thomas Gleixner , Ingo Molnar , Kees Cook , Sandipan Das , David Woodhouse , Paul Lawrence , Herbert Xu , Josh Poimboeuf , Geert Uytterhoeven , Tom Lendacky , Arnd Bergmann , Dan Williams , Michal Hocko , Jan Kara , Ross Zwisler , =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= , Matthew Wilcox , "Kirill A . Shutemov" , Souptick Joarder , Hugh Dickins , Davidlohr Bueso , Greg Kroah-Hartman , Philippe Ombredanne , Kate Stewart , Laura Abbott , Boris Brezillon , Vlastimil Babka , Pintu Agarwal , Doug Berger , Anshuman Khandual , Mike Rapoport , Mel Gorman , Pavel Tatashin , Tetsuo Handa , kasan-dev@googlegroups.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sparse@vger.kernel.org, linux-mm@kvack.org, linux-kbuild@vger.kernel.org Cc: Kostya Serebryany , Evgeniy Stepanov , Lee Smith , Ramana Radhakrishnan , Jacob Bramley , Ruben Ayrapetyan , Kees Cook , Jann Horn , Mark Brand On 5/25/2018 8:10 PM, Andrey Konovalov wrote: ... > +ifdef CONFIG_KASAN_HW > + > +ifdef CONFIG_KASAN_INLINE > + instrumentation_flags := -mllvm -hwasan-mapping-offset=$(KASAN_SHADOW_OFFSET) > +else > + instrumentation_flags := -mllvm -hwasan-instrument-with-calls=1 > +endif > > +CFLAGS_KASAN := -fsanitize=kernel-hwaddress \ > + -mllvm -hwasan-instrument-stack=0 \ > + $(instrumentation_flags) > + > +ifeq ($(call cc-option, $(CFLAGS_KASAN_MINIMAL) -Werror),) /s/CFLAGS_KASAN_MINIMAL/CFLAGS_KASAN ?? > + ifneq ($(CONFIG_COMPILE_TEST),y) > + $(warning Cannot use CONFIG_KASAN_HW: \ > + -fsanitize=hwaddress is not supported by compiler) > + endif > +endif > + > +endif > + > +ifdef CONFIG_KASAN > +CFLAGS_KASAN_NOSANITIZE := -fno-builtin > endif > Chintan -- Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project