From: Christophe Leroy <christophe.leroy@c-s.fr>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Michael Ellerman <mpe@ellerman.id.au>,
Nicholas Piggin <npiggin@gmail.com>,
"Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>,
Andrey Ryabinin <aryabinin@virtuozzo.com>,
Alexander Potapenko <glider@google.com>,
Dmitry Vyukov <dvyukov@google.com>,
Daniel Axtens <dja@axtens.net>
Cc: linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org,
linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com
Subject: Re: [PATCH v11 09/13] powerpc: disable KASAN instrumentation on early/critical files.
Date: Fri, 3 May 2019 09:38:06 +0200 [thread overview]
Message-ID: <5cff9551-e0ce-a2a4-989c-6b55825fa171@c-s.fr> (raw)
In-Reply-To: <867c149e77f80e855a9310a490fb15ca03ffd63d.1556295461.git.christophe.leroy@c-s.fr>
Le 26/04/2019 à 18:23, Christophe Leroy a écrit :
> All files containing functions run before kasan_early_init() is called
> must have KASAN instrumentation disabled.
>
> For those file, branch profiling also have to be disabled otherwise
> each if () generates a call to ftrace_likely_update().
>
> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
> ---
> arch/powerpc/kernel/Makefile | 12 ++++++++++++
> arch/powerpc/lib/Makefile | 8 ++++++++
> arch/powerpc/mm/Makefile | 6 ++++++
> arch/powerpc/platforms/powermac/Makefile | 6 ++++++
> arch/powerpc/purgatory/Makefile | 3 +++
> arch/powerpc/xmon/Makefile | 1 +
> 6 files changed, 36 insertions(+)
>
[...]
> diff --git a/arch/powerpc/mm/Makefile b/arch/powerpc/mm/Makefile
> index 3c1bd9fa23cd..dd945ca869b2 100644
> --- a/arch/powerpc/mm/Makefile
> +++ b/arch/powerpc/mm/Makefile
> @@ -7,6 +7,12 @@ ccflags-$(CONFIG_PPC64) := $(NO_MINIMAL_TOC)
>
> CFLAGS_REMOVE_slb.o = $(CC_FLAGS_FTRACE)
>
> +KASAN_SANITIZE_ppc_mmu_32.o := n
> +
> +ifdef CONFIG_KASAN
> +CFLAGS_ppc_mmu_32.o += -DDISABLE_BRANCH_PROFILING
> +endif
> +
The above is missing in powerpc/next (should now be in
arch/powerpc/mm/book3s32/Makefile )
Christophe
next prev parent reply other threads:[~2019-05-03 7:38 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-26 16:23 [PATCH v11 00/13] KASAN for powerpc/32 Christophe Leroy
2019-04-26 16:23 ` [PATCH v11 01/13] powerpc/32: Move early_init() in a separate file Christophe Leroy
2019-05-03 6:59 ` Michael Ellerman
2019-04-26 16:23 ` [PATCH v11 02/13] powerpc: prepare string/mem functions for KASAN Christophe Leroy
2019-04-26 16:23 ` [PATCH v11 03/13] powerpc: remove CONFIG_CMDLINE #ifdef mess Christophe Leroy
2019-04-26 16:23 ` [PATCH v11 04/13] powerpc/prom_init: don't use string functions from lib/ Christophe Leroy
2019-04-26 16:23 ` [PATCH v11 05/13] powerpc: don't use direct assignation during early boot Christophe Leroy
2019-04-26 16:23 ` [PATCH v11 06/13] powerpc/32: use memset() instead of memset_io() to zero BSS Christophe Leroy
2019-04-26 16:23 ` [PATCH v11 07/13] powerpc/32: make KVIRT_TOP dependent on FIXMAP_START Christophe Leroy
2019-04-26 16:23 ` [PATCH v11 08/13] powerpc/32: prepare shadow area for KASAN Christophe Leroy
2019-04-26 16:23 ` [PATCH v11 09/13] powerpc: disable KASAN instrumentation on early/critical files Christophe Leroy
2019-05-03 7:38 ` Christophe Leroy [this message]
2019-04-26 16:23 ` [PATCH v11 10/13] powerpc/32: Add KASAN support Christophe Leroy
2019-05-03 6:51 ` Christophe Leroy
2019-04-26 16:23 ` [PATCH v11 11/13] powerpc/32s: move hash code patching out of MMU_init_hw() Christophe Leroy
2019-04-26 16:23 ` [PATCH v11 12/13] powerpc/32s: set up an early static hash table for KASAN Christophe Leroy
2019-04-26 16:23 ` [PATCH v11 13/13] powerpc/32s: map kasan zero shadow with PAGE_READONLY instead of PAGE_KERNEL_RO Christophe Leroy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5cff9551-e0ce-a2a4-989c-6b55825fa171@c-s.fr \
--to=christophe.leroy@c-s.fr \
--cc=aneesh.kumar@linux.ibm.com \
--cc=aryabinin@virtuozzo.com \
--cc=benh@kernel.crashing.org \
--cc=dja@axtens.net \
--cc=dvyukov@google.com \
--cc=glider@google.com \
--cc=kasan-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).