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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250828071850.kl7clyh6e75horlk@master>
Date: Thu, 28 Aug 2025 07:18:50 +0000
From: Wei Yang <richard.weiyang@...il.com>
To: David Hildenbrand <david@...hat.com>
Cc: linux-kernel@...r.kernel.org, Zi Yan <ziy@...dia.com>,
	"Mike Rapoport (Microsoft)" <rppt@...nel.org>,
	SeongJae Park <sj@...nel.org>, Huacai Chen <chenhuacai@...nel.org>,
	WANG Xuerui <kernel@...0n.name>,
	Madhavan Srinivasan <maddy@...ux.ibm.com>,
	Michael Ellerman <mpe@...erman.id.au>,
	Nicholas Piggin <npiggin@...il.com>,
	Christophe Leroy <christophe.leroy@...roup.eu>,
	Paul Walmsley <paul.walmsley@...ive.com>,
	Palmer Dabbelt <palmer@...belt.com>,
	Albert Ou <aou@...s.berkeley.edu>, Alexandre Ghiti <alex@...ti.fr>,
	"David S. Miller" <davem@...emloft.net>,
	Andreas Larsson <andreas@...sler.com>,
	Alexander Potapenko <glider@...gle.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Brendan Jackman <jackmanb@...gle.com>,
	Christoph Lameter <cl@...two.org>, Dennis Zhou <dennis@...nel.org>,
	Dmitry Vyukov <dvyukov@...gle.com>, dri-devel@...ts.freedesktop.org,
	intel-gfx@...ts.freedesktop.org, iommu@...ts.linux.dev,
	io-uring@...r.kernel.org, Jason Gunthorpe <jgg@...dia.com>,
	Jens Axboe <axboe@...nel.dk>, Johannes Weiner <hannes@...xchg.org>,
	John Hubbard <jhubbard@...dia.com>, kasan-dev@...glegroups.com,
	kvm@...r.kernel.org, "Liam R. Howlett" <Liam.Howlett@...cle.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	linux-arm-kernel@...s.com, linux-arm-kernel@...ts.infradead.org,
	linux-crypto@...r.kernel.org, linux-ide@...r.kernel.org,
	linux-kselftest@...r.kernel.org, linux-mips@...r.kernel.org,
	linux-mmc@...r.kernel.org, linux-mm@...ck.org,
	linux-riscv@...ts.infradead.org, linux-s390@...r.kernel.org,
	linux-scsi@...r.kernel.org,
	Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
	Marco Elver <elver@...gle.com>,
	Marek Szyprowski <m.szyprowski@...sung.com>,
	Michal Hocko <mhocko@...e.com>, Muchun Song <muchun.song@...ux.dev>,
	netdev@...r.kernel.org, Oscar Salvador <osalvador@...e.de>,
	Peter Xu <peterx@...hat.com>, Robin Murphy <robin.murphy@....com>,
	Suren Baghdasaryan <surenb@...gle.com>, Tejun Heo <tj@...nel.org>,
	virtualization@...ts.linux.dev, Vlastimil Babka <vbabka@...e.cz>,
	wireguard@...ts.zx2c4.com, x86@...nel.org
Subject: Re: [PATCH v1 01/36] mm: stop making SPARSEMEM_VMEMMAP
 user-selectable

On Thu, Aug 28, 2025 at 12:01:05AM +0200, David Hildenbrand wrote:
>In an ideal world, we wouldn't have to deal with SPARSEMEM without
>SPARSEMEM_VMEMMAP, but in particular for 32bit SPARSEMEM_VMEMMAP is
>considered too costly and consequently not supported.
>
>However, if an architecture does support SPARSEMEM with
>SPARSEMEM_VMEMMAP, let's forbid the user to disable VMEMMAP: just
>like we already do for arm64, s390 and x86.
>
>So if SPARSEMEM_VMEMMAP is supported, don't allow to use SPARSEMEM without
>SPARSEMEM_VMEMMAP.
>
>This implies that the option to not use SPARSEMEM_VMEMMAP will now be
>gone for loongarch, powerpc, riscv and sparc. All architectures only
>enable SPARSEMEM_VMEMMAP with 64bit support, so there should not really
>be a big downside to using the VMEMMAP (quite the contrary).
>
>This is a preparation for not supporting
>
>(1) folio sizes that exceed a single memory section
>(2) CMA allocations of non-contiguous page ranges
>
>in SPARSEMEM without SPARSEMEM_VMEMMAP configs, whereby we
>want to limit possible impact as much as possible (e.g., gigantic hugetlb
>page allocations suddenly fails).
>
>Acked-by: Zi Yan <ziy@...dia.com>
>Acked-by: Mike Rapoport (Microsoft) <rppt@...nel.org>
>Acked-by: SeongJae Park <sj@...nel.org>
>Cc: Huacai Chen <chenhuacai@...nel.org>
>Cc: WANG Xuerui <kernel@...0n.name>
>Cc: Madhavan Srinivasan <maddy@...ux.ibm.com>
>Cc: Michael Ellerman <mpe@...erman.id.au>
>Cc: Nicholas Piggin <npiggin@...il.com>
>Cc: Christophe Leroy <christophe.leroy@...roup.eu>
>Cc: Paul Walmsley <paul.walmsley@...ive.com>
>Cc: Palmer Dabbelt <palmer@...belt.com>
>Cc: Albert Ou <aou@...s.berkeley.edu>
>Cc: Alexandre Ghiti <alex@...ti.fr>
>Cc: "David S. Miller" <davem@...emloft.net>
>Cc: Andreas Larsson <andreas@...sler.com>
>Signed-off-by: David Hildenbrand <david@...hat.com>

Reviewed-by: Wei Yang <richard.weiyang@...il.com>

>---
> mm/Kconfig | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
>diff --git a/mm/Kconfig b/mm/Kconfig
>index 4108bcd967848..330d0e698ef96 100644
>--- a/mm/Kconfig
>+++ b/mm/Kconfig
>@@ -439,9 +439,8 @@ config SPARSEMEM_VMEMMAP_ENABLE
> 	bool
> 
> config SPARSEMEM_VMEMMAP
>-	bool "Sparse Memory virtual memmap"
>+	def_bool y
> 	depends on SPARSEMEM && SPARSEMEM_VMEMMAP_ENABLE
>-	default y
> 	help
> 	  SPARSEMEM_VMEMMAP uses a virtually mapped memmap to optimise
> 	  pfn_to_page and page_to_pfn operations.  This is the most
>-- 
>2.50.1
>

-- 
Wei Yang
Help you, Help me

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ