lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <170988542239.398.10746491684726406217.tip-bot2@tip-bot2>
Date: Fri, 08 Mar 2024 08:10:22 -0000
From: "tip-bot2 for Changbin Du" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Changbin Du <changbin.du@...wei.com>,
 "Borislav Petkov (AMD)" <bp@...en8.de>, x86@...nel.org,
 linux-kernel@...r.kernel.org
Subject: [tip: x86/sev] x86/sev: Disable KMSAN for memory encryption TUs

The following commit has been merged into the x86/sev branch of tip:

Commit-ID:     c0935fca6ba4799e5efc6daeee37887e84707d01
Gitweb:        https://git.kernel.org/tip/c0935fca6ba4799e5efc6daeee37887e84707d01
Author:        Changbin Du <changbin.du@...wei.com>
AuthorDate:    Fri, 08 Mar 2024 12:44:01 +08:00
Committer:     Borislav Petkov (AMD) <bp@...en8.de>
CommitterDate: Fri, 08 Mar 2024 08:59:22 +01:00

x86/sev: Disable KMSAN for memory encryption TUs

Instrumenting sev.c and mem_encrypt_identity.c with KMSAN will result in
a triple-faulting kernel. Some of the code is invoked too early during
boot, before KMSAN is ready.

Disable KMSAN instrumentation for the two translation units.

  [ bp: Massage commit message. ]

Signed-off-by: Changbin Du <changbin.du@...wei.com>
Signed-off-by: Borislav Petkov (AMD) <bp@...en8.de>
Link: https://lore.kernel.org/r/20240308044401.1120395-1-changbin.du@huawei.com
---
 arch/x86/kernel/Makefile | 1 +
 arch/x86/mm/Makefile     | 1 +
 2 files changed, 2 insertions(+)

diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
index 0000325..04591d0 100644
--- a/arch/x86/kernel/Makefile
+++ b/arch/x86/kernel/Makefile
@@ -33,6 +33,7 @@ KASAN_SANITIZE_sev.o					:= n
 KCSAN_SANITIZE := n
 KMSAN_SANITIZE_head$(BITS).o				:= n
 KMSAN_SANITIZE_nmi.o					:= n
+KMSAN_SANITIZE_sev.o					:= n
 
 # If instrumentation of the following files is enabled, boot hangs during
 # first second.
diff --git a/arch/x86/mm/Makefile b/arch/x86/mm/Makefile
index c80febc..6ec103b 100644
--- a/arch/x86/mm/Makefile
+++ b/arch/x86/mm/Makefile
@@ -16,6 +16,7 @@ KASAN_SANITIZE_pgprot.o		:= n
 KCSAN_SANITIZE := n
 # Avoid recursion by not calling KMSAN hooks for CEA code.
 KMSAN_SANITIZE_cpu_entry_area.o := n
+KMSAN_SANITIZE_mem_encrypt_identity.o := n
 
 ifdef CONFIG_FUNCTION_TRACER
 CFLAGS_REMOVE_mem_encrypt.o		= -pg

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ