]> git.baikalelectronics.ru Git - kernel.git/commit
x86/mm: disable instrumentations of mm/pgprot.c
authorNaohiro Aota <naohiro.aota@wdc.com>
Wed, 24 Aug 2022 08:47:26 +0000 (17:47 +0900)
committerAndrew Morton <akpm@linux-foundation.org>
Sun, 11 Sep 2022 23:22:30 +0000 (16:22 -0700)
commite884d814d3a3d575492dfc67ef72c163f9dc417e
tree12a774f30c5e8a42199433d631b838d0c08f5007
parent5038347193e2932a5bfb7f6d7b69049b3fa3a373
x86/mm: disable instrumentations of mm/pgprot.c

Commit c017721a8275 ("x86/mm: move protection_map[] inside the platform")
moved accesses to protection_map[] from mem_encrypt_amd.c to pgprot.c.  As
a result, the accesses are now targets of KASAN (and other
instrumentations), leading to the crash during the boot process.

Disable the instrumentations for pgprot.c like commit 15604e63ce26
("x86/mm: Disable various instrumentations of mm/mem_encrypt.c and
mm/tlb.c").

Before this patch, my AMD machine cannot boot since v6.0-rc1 with KASAN
enabled, without anything printed.  After the change, it successfully
boots up.

Fixes: c017721a8275 ("x86/mm: move protection_map[] inside the platform")
Link: https://lkml.kernel.org/r/20220824084726.2174758-1-naohiro.aota@wdc.com
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Cc: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/x86/mm/Makefile