[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACRpkdbR2VG422X0-nhOeWtS3Mhm7M1+RKMozBZbg0Jv5c_TTQ@mail.gmail.com>
Date: Sun, 12 Apr 2020 02:33:38 +0200
From: Linus Walleij <linus.walleij@...aro.org>
To: Ard Biesheuvel <ardb@...nel.org>
Cc: Florian Fainelli <f.fainelli@...il.com>,
linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
Andrey Ryabinin <ryabinin@...tuozzo.com>,
Abbott Liu <liuwenliang@...wei.com>,
bcm-kernel-feedback-list <bcm-kernel-feedback-list@...adcom.com>,
Alexander Potapenko <glider@...gle.com>,
Dmitry Vyukov <dvyukov@...gle.com>,
Jonathan Corbet <corbet@....net>,
Russell King <linux@...linux.org.uk>,
Christoffer Dall <christoffer.dall@....com>,
Marc Zyngier <marc.zyngier@....com>,
Arnd Bergmann <arnd@...db.de>,
Nicolas Pitre <nico@...xnic.net>,
Vladimir Murzin <vladimir.murzin@....com>,
Kees Cook <keescook@...omium.org>,
Jinbum Park <jinb.park7@...il.com>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
Daniel Lezcano <daniel.lezcano@...aro.org>,
Philippe Ombredanne <pombredanne@...b.com>,
Rob Landley <rob@...dley.net>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Mark Rutland <mark.rutland@....com>,
Catalin Marinas <catalin.marinas@....com>,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
Thomas Gleixner <tglx@...utronix.de>,
Thomas Garnier <thgarnie@...gle.com>,
David Howells <dhowells@...hat.com>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Andre Przywara <andre.przywara@....com>,
Julien Thierry <julien.thierry@....com>,
Andrew Jones <drjones@...hat.com>,
Philip Derrin <philip@....systems>,
Michal Hocko <mhocko@...e.com>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
kasan-dev <kasan-dev@...glegroups.com>,
Linux Doc Mailing List <linux-doc@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
kvmarm <kvmarm@...ts.cs.columbia.edu>,
Andrey Ryabinin <ryabinin.a.a@...il.com>
Subject: Re: [PATCH v7 7/7] ARM: Enable KASan for ARM
On Fri, Apr 10, 2020 at 12:45 PM Ard Biesheuvel <ardb@...nel.org> wrote:
> > +CFLAGS_KERNEL += -D__SANITIZE_ADDRESS__
(...)
> > - $(call cc-option,-mno-single-pic-base)
> > + $(call cc-option,-mno-single-pic-base) \
> > + -D__SANITIZE_ADDRESS__
>
> I am not too crazy about this need to unconditionally 'enable' KASAN
> on the command line like this, in order to be able to disable it again
> when CONFIG_KASAN=y.
>
> Could we instead add something like this at the top of
> arch/arm/boot/compressed/string.c?
>
> #ifdef CONFIG_KASAN
> #undef memcpy
> #undef memmove
> #undef memset
> void *__memcpy(void *__dest, __const void *__src, size_t __n) __alias(memcpy);
> void *__memmove(void *__dest, __const void *__src, size_t count)
> __alias(memmove);
> void *__memset(void *s, int c, size_t count) __alias(memset);
> #endif
I obviously missed this before I sent out my new version of the series.
It bothers me too.
I will try this approach when I prepare the next iteration.
Thanks a lot!
Yours,
Linus Walleij
Powered by blists - more mailing lists