From a3453d923ece6760689894bad5b6d5e00c0ffe2d Mon Sep 17 00:00:00 2001
From: Vasily Gorbik <gor@linux.ibm.com>
Date: Thu, 15 Oct 2020 10:01:42 +0200
Subject: s390/kasan: remove 3-level paging support

Compiling the kernel with Kasan disables automatic 3-level vs 4-level
kernel space paging selection, because the shadow memory offset has
to be known at compile time and there is no such offset which would be
acceptable for both 3 and 4-level paging. Instead S390_4_LEVEL_PAGING
option was introduced which allowed to pick how many paging levels to
use under Kasan.

With the introduction of protected virtualization, kernel memory layout
may be affected due to ultravisor secure storage limit. This adds
additional complexity into how memory layout would look like in
combination with Kasan predefined shadow memory offsets. To simplify
this make Kasan 4-level paging default and remove Kasan 3-level paging
support.

Suggested-by: Heiko Carstens <hca@linux.ibm.com>
Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
---
 lib/Kconfig.kasan | 9 ---------
 1 file changed, 9 deletions(-)

(limited to 'lib/Kconfig.kasan')

diff --git a/lib/Kconfig.kasan b/lib/Kconfig.kasan
index 542a9c18398e..8fb097057fec 100644
--- a/lib/Kconfig.kasan
+++ b/lib/Kconfig.kasan
@@ -136,15 +136,6 @@ config KASAN_STACK
 	default 1 if KASAN_STACK_ENABLE || CC_IS_GCC
 	default 0
 
-config KASAN_S390_4_LEVEL_PAGING
-	bool "KASan: use 4-level paging"
-	depends on S390
-	help
-	  Compiling the kernel with KASan disables automatic 3-level vs
-	  4-level paging selection. 3-level paging is used by default (up
-	  to 3TB of RAM with KASan enabled). This options allows to force
-	  4-level paging instead.
-
 config KASAN_SW_TAGS_IDENTIFY
 	bool "Enable memory corruption identification"
 	depends on KASAN_SW_TAGS
-- 
cgit v1.2.3