[RFC PATCH 2/8] arm64: Kconfig: fix ARCH_MMAP_RND_BITS_MAX for 52-bit virtual addressing

Ard Biesheuvel posted 8 patches 3 weeks, 4 days ago
[RFC PATCH 2/8] arm64: Kconfig: fix ARCH_MMAP_RND_BITS_MAX for 52-bit virtual addressing
Posted by Ard Biesheuvel 3 weeks, 4 days ago
From: Ard Biesheuvel <ardb@kernel.org>

The default values for ARCH_MMAP_RND_BITS_MAX fail to take into account
that we now have support for 52-bit virtual addressing. As these configs
are compatible with hardware that is incapable of 52-bit virtual
addressing, use the same value we use for 47/48-bit virtual addressing.
(For the sake of simplicity, use the same value for 47 and 48 bit
virtual addressing for 16k pages)

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
---
 arch/arm64/Kconfig | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index ec218ef22f2b..ac8e7550430b 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -324,13 +324,9 @@ config ARCH_MMAP_RND_BITS_MAX
 	default 19 if ARM64_VA_BITS=36
 	default 24 if ARM64_VA_BITS=39
 	default 27 if ARM64_VA_BITS=42
-	default 30 if ARM64_VA_BITS=47
-	default 29 if ARM64_VA_BITS=48 && ARM64_64K_PAGES
-	default 31 if ARM64_VA_BITS=48 && ARM64_16K_PAGES
-	default 33 if ARM64_VA_BITS=48
-	default 14 if ARM64_64K_PAGES
-	default 16 if ARM64_16K_PAGES
-	default 18
+	default 29 if ARM64_64K_PAGES
+	default 30 if ARM64_16K_PAGES
+	default 33
 
 config ARCH_MMAP_RND_COMPAT_BITS_MIN
 	default 7 if ARM64_64K_PAGES
-- 
2.47.0.163.g1226f6d8fa-goog