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

Johannes Berg
2022-05-26T09:29:41Z

On Wed, 2022-05-25 at 18:01 -0700, David Gow wrote:
>
> +#ifdef CONFIG_KASAN
> +void kasan_init(void)
> +{
> + /*
> + * kasan_map_memory will map all of the required address space and
> + * the host machine will allocate physical memory as necessary.
> + */
> + kasan_map_memory((void *)KASAN_SHADOW_START, KASAN_SHADOW_SIZE);
> + init_task.kasan_depth = 0;
> + os_info("KernelAddressSanitizer initialized\n");
>

Can we remove this? Or maybe print it later somehow, when the other
KASAN machinery initializes?

As it is, this gets printed even if you run just "./linux --version" or
"--help", which is a bit strange.

johannes