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] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 28 Oct 2023 14:52:16 +0100
From:   Jiaxun Yang <jiaxun.yang@...goat.com>
To:     Thomas Bogendoerfer <tsbogend@...ha.franken.de>
Cc:     linux-mips@...r.kernel.org, linux-kernel@...r.kernel.org,
        Jiaxun Yang <jiaxun.yang@...goat.com>
Subject: [PATCH 1/2] MIPS: Enable SPARSEMEM option unconditionally on 64BIT

SPARSEMEM have been tested on Cavium and Loongson64 for a while
and we are confident that they are working properly on 64bit
systems.

Since it's almost certain for 64bit MIPS system to have a hole
in memory space, SPARSEMEM will be more efficent for them.

Also promote platforms marked with SPARSEMEM_ENABLE before
to SPARSEMEM_DEFAULT, as they tend to have huge holes in
address space.

Signed-off-by: Jiaxun Yang <jiaxun.yang@...goat.com>
---
 arch/mips/Kconfig             | 13 ++++++++-----
 arch/mips/loongson2ef/Kconfig |  4 ++--
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 76db82542519..d12e8f3c1d08 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -460,7 +460,7 @@ config MACH_LOONGSON2EF
 
 config MACH_LOONGSON64
 	bool "Loongson 64-bit family of machines"
-	select ARCH_SPARSEMEM_ENABLE
+	select ARCH_SPARSEMEM_DEFAULT
 	select ARCH_MIGHT_HAVE_PC_PARPORT
 	select ARCH_MIGHT_HAVE_PC_SERIO
 	select GENERIC_ISA_DMA_SUPPORT_BROKEN
@@ -656,7 +656,7 @@ config SGI_IP22
 config SGI_IP27
 	bool "SGI IP27 (Origin200/2000)"
 	select ARCH_HAS_PHYS_TO_DMA
-	select ARCH_SPARSEMEM_ENABLE
+	select ARCH_SPARSEMEM_DEFAULT
 	select FW_ARC
 	select FW_ARC64
 	select ARC_CMDLINE_ONLY
@@ -923,7 +923,7 @@ config CAVIUM_OCTEON_SOC
 	select ZONE_DMA32
 	select GPIOLIB
 	select USE_OF
-	select ARCH_SPARSEMEM_ENABLE
+	select ARCH_SPARSEMEM_DEFAULT
 	select SYS_SUPPORTS_SMP
 	select NR_CPUS_DEFAULT_64
 	select MIPS_NR_CPU_NR_MAP_1024
@@ -2573,10 +2573,13 @@ config CPU_SUPPORTS_MSA
 
 config ARCH_FLATMEM_ENABLE
 	def_bool y
-	depends on !NUMA && !CPU_LOONGSON2EF
 
 config ARCH_SPARSEMEM_ENABLE
-	bool
+	def_bool y
+	depends on 64BIT
+
+config ARCH_SELECT_MEMORY_MODEL
+	def_bool ARCH_SPARSEMEM_ENABLE
 
 config NUMA
 	bool "NUMA Support"
diff --git a/arch/mips/loongson2ef/Kconfig b/arch/mips/loongson2ef/Kconfig
index f93eb6f42238..e593294b2995 100644
--- a/arch/mips/loongson2ef/Kconfig
+++ b/arch/mips/loongson2ef/Kconfig
@@ -6,7 +6,7 @@ choice
 
 config LEMOTE_FULOONG2E
 	bool "Lemote Fuloong(2e) mini-PC"
-	select ARCH_SPARSEMEM_ENABLE
+	select ARCH_SPARSEMEM_DEFAULT
 	select ARCH_HAS_PHYS_TO_DMA
 	select ARCH_MIGHT_HAVE_PC_PARPORT
 	select ARCH_MIGHT_HAVE_PC_SERIO
@@ -36,7 +36,7 @@ config LEMOTE_FULOONG2E
 
 config LEMOTE_MACH2F
 	bool "Lemote Loongson 2F family machines"
-	select ARCH_SPARSEMEM_ENABLE
+	select ARCH_SPARSEMEM_DEFAULT
 	select ARCH_HAS_PHYS_TO_DMA
 	select ARCH_MIGHT_HAVE_PC_PARPORT
 	select ARCH_MIGHT_HAVE_PC_SERIO

-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ