Re: [RFC PATCH] UML: add support for KASAN under x86_64

From: Dmitry Vyukov
Date: Thu Jan 16 2020 - 03:51:08 EST


On Wed, Jan 15, 2020 at 7:28 PM Patricia Alfonso
<trishalfonso@xxxxxxxxxx> wrote:
>
> Make KASAN run on User Mode Linux on x86_64.
> diff --git a/arch/um/kernel/Makefile b/arch/um/kernel/Makefile
> index 5aa882011e04..f783a7dd863c 100644
> --- a/arch/um/kernel/Makefile
> +++ b/arch/um/kernel/Makefile
> @@ -8,6 +8,9 @@
> # kernel.
> KCOV_INSTRUMENT := n
>
> +# Do not instrument on main.o

It's always good to explain why. Otherwise it will be stuck there
forever because nobody really knows why and if they will break
something by removing it.
This comment is also somewhat confusing. We don't instrument the whole
dir, not just main.c? Should we ignore just this single file as
comment says?

> +KASAN_SANITIZE := n
> +