lkml.org 
[lkml]   [2019]   [May]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v11 09/13] powerpc: disable KASAN instrumentation on early/critical files.
From
Date


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

\
 
 \ /
  Last update: 2019-05-03 09:39    [W:0.061 / U:0.508 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site