[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aVrUDeSkqqY9ZCtS@shell.armlinux.org.uk>
Date: Sun, 4 Jan 2026 20:56:45 +0000
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Mike Rapoport <rppt@...nel.org>
Cc: Klara Modin <klarasmodin@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Alex Shi <alexs@...nel.org>,
Alexander Gordeev <agordeev@...ux.ibm.com>,
Andreas Larsson <andreas@...sler.com>,
Borislav Petkov <bp@...en8.de>, Brian Cain <bcain@...nel.org>,
"Christophe Leroy (CS GROUP)" <chleroy@...nel.org>,
Catalin Marinas <catalin.marinas@....com>,
"David S. Miller" <davem@...emloft.net>,
Dave Hansen <dave.hansen@...ux.intel.com>,
David Hildenbrand <david@...nel.org>,
Dinh Nguyen <dinguyen@...nel.org>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Guo Ren <guoren@...nel.org>, Heiko Carstens <hca@...ux.ibm.com>,
Helge Deller <deller@....de>, Huacai Chen <chenhuacai@...nel.org>,
Ingo Molnar <mingo@...hat.com>,
Johannes Berg <johannes@...solutions.net>,
John Paul Adrian Glaubitz <glaubitz@...sik.fu-berlin.de>,
Jonathan Corbet <corbet@....net>,
"Liam R. Howlett" <Liam.Howlett@...cle.com>,
Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
Magnus Lindholm <linmag7@...il.com>,
Matt Turner <mattst88@...il.com>, Max Filippov <jcmvbkbc@...il.com>,
Michael Ellerman <mpe@...erman.id.au>,
Michal Hocko <mhocko@...e.com>, Michal Simek <monstr@...str.eu>,
Muchun Song <muchun.song@...ux.dev>,
Oscar Salvador <osalvador@...e.de>,
Palmer Dabbelt <palmer@...belt.com>,
Pratyush Yadav <pratyush@...nel.org>,
Richard Weinberger <richard@....at>,
Stafford Horne <shorne@...il.com>,
Suren Baghdasaryan <surenb@...gle.com>,
Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
Thomas Gleixner <tglx@...utronix.de>,
Vasily Gorbik <gor@...ux.ibm.com>, Vineet Gupta <vgupta@...nel.org>,
Vlastimil Babka <vbabka@...e.cz>, Will Deacon <will@...nel.org>,
x86@...nel.org, linux-alpha@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-csky@...r.kernel.org,
linux-cxl@...r.kernel.org, linux-doc@...r.kernel.org,
linux-hexagon@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-m68k@...ts.linux-m68k.org, linux-mips@...r.kernel.org,
linux-mm@...ck.org, linux-openrisc@...r.kernel.org,
linux-parisc@...r.kernel.org, linux-riscv@...ts.infradead.org,
linux-s390@...r.kernel.org, linux-sh@...r.kernel.org,
linux-snps-arc@...ts.infradead.org, linux-um@...ts.infradead.org,
linuxppc-dev@...ts.ozlabs.org, loongarch@...ts.linux.dev,
sparclinux@...r.kernel.org
Subject: Re: [PATCH 3.5] arm: make initialization of zero page independent of
the memory map (was Re: [PATCH v2 22/28] arch, mm: consolidate
initialization of nodes, zones and memory map)
On Sun, Jan 04, 2026 at 02:01:40PM +0200, Mike Rapoport wrote:
> From 35d016bbf5da7c08cc5c5547c85558fc50cb63aa Mon Sep 17 00:00:00 2001
> From: Klara Modin <klarasmodin@...il.com>
> Date: Sat, 3 Jan 2026 20:40:09 +0200
> Subject: [PATCH] arm: make initialization of zero page independent of the
> memory map
>
> Unlike most architectures, arm keeps a struct page pointer to the
> empty_zero_page and to initialize it requires conversion of a virtual
> address to page which makes it necessary to have memory map initialized
> before creating the empty_zero_page.
>
> Make empty_zero_page a stataic array in BSS to decouple it's
> initialization from the initialization of the memory map.
I see you haven't considered _why_ ARM does this.
You are getting rid of the flush_dcache_page() call, which ensures
that the zeroed contents of the page are pushed out of the cache
into memory. This is necessary.
BSS is very similar. It's memset() during the kernel boot _after_
the caches are enabled. Without an explicit flush, nothing
guarantees that those writes will be visible to userspace.
To me, this seems like a bad idea, which will cause userspace to
break.
We need to call flush_dcache_page(), and _that_ requires a struct
page.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
Powered by blists - more mailing lists