Re: AMD SME + KASAN = doom

From: Qian Cai
Date: Sat Jun 13 2020 - 13:04:27 EST




> On Jun 13, 2020, at 11:54 AM, Borislav Petkov <bp@xxxxxxx> wrote:
>
> $ head arch/x86/mm/Makefile
> # SPDX-License-Identifier: GPL-2.0
> # Kernel does not boot with instrumentation of tlb.c and mem_encrypt*.c
> KCOV_INSTRUMENT_tlb.o := n
> KCOV_INSTRUMENT_mem_encrypt.o := n
> KCOV_INSTRUMENT_mem_encrypt_identity.o := n
>
> KASAN_SANITIZE_mem_encrypt.o := n
> KASAN_SANITIZE_mem_encrypt_identity.o := n
>
> so something else needs to be de-KASAN-ed too.

Okay, Iâll try to figure out what else needs to be done.

>
> For now flip your Subject: AMD SME - KASAN = boot.

Which is a bit of shame because KASAN is proved useful for testing and at the same time SME could flags some issues with drivers like megasas_raid (where the driver will do a firmware dump during the boot which I plan to debug more a bit later).