From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Mike Rapoport <rppt@kernel.org>
Cc: Klara Modin <klarasmodin@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
Alex Shi <alexs@kernel.org>,
Alexander Gordeev <agordeev@linux.ibm.com>,
Andreas Larsson <andreas@gaisler.com>,
Borislav Petkov <bp@alien8.de>, Brian Cain <bcain@kernel.org>,
"Christophe Leroy (CS GROUP)" <chleroy@kernel.org>,
Catalin Marinas <catalin.marinas@arm.com>,
"David S. Miller" <davem@davemloft.net>,
Dave Hansen <dave.hansen@linux.intel.com>,
David Hildenbrand <david@kernel.org>,
Dinh Nguyen <dinguyen@kernel.org>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Guo Ren <guoren@kernel.org>, Heiko Carstens <hca@linux.ibm.com>,
Helge Deller <deller@gmx.de>, Huacai Chen <chenhuacai@kernel.org>,
Ingo Molnar <mingo@redhat.com>,
Johannes Berg <johannes@sipsolutions.net>,
John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>,
Jonathan Corbet <corbet@lwn.net>,
"Liam R. Howlett" <Liam.Howlett@oracle.com>,
Lorenzo Stoakes <lorenzo.stoakes@oracle.com>,
Magnus Lindholm <linmag7@gmail.com>,
Matt Turner <mattst88@gmail.com>,
Max Filippov <jcmvbkbc@gmail.com>,
Michael Ellerman <mpe@ellerman.id.au>,
Michal Hocko <mhocko@suse.com>, Michal Simek <monstr@monstr.eu>,
Muchun Song <muchun.song@linux.dev>,
Oscar Salvador <osalvador@suse.de>,
Palmer Dabbelt <palmer@dabbelt.com>,
Pratyush Yadav <pratyush@kernel.org>,
Richard Weinberger <richard@nod.at>,
Stafford Horne <shorne@gmail.com>,
Suren Baghdasaryan <surenb@google.com>,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
Thomas Gleixner <tglx@linutronix.de>,
Vasily Gorbik <gor@linux.ibm.com>,
Vineet Gupta <vgupta@kernel.org>,
Vlastimil Babka <vbabka@suse.cz>, Will Deacon <will@kernel.org>,
x86@kernel.org, linux-alpha@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org,
linux-cxl@vger.kernel.org, linux-doc@vger.kernel.org,
linux-hexagon@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org,
linux-mm@kvack.org, linux-openrisc@vger.kernel.org,
linux-parisc@vger.kernel.org, linux-riscv@lists.infradead.org,
linux-s390@vger.kernel.org, linux-sh@vger.kernel.org,
linux-snps-arc@lists.infradead.org, linux-um@lists.infradead.org,
linuxppc-dev@lists.ozlabs.org, loongarch@lists.linux.dev,
sparclinux@vger.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)
Date: Sun, 4 Jan 2026 20:56:45 +0000 [thread overview]
Message-ID: <aVrUDeSkqqY9ZCtS@shell.armlinux.org.uk> (raw)
In-Reply-To: <aVpWpLV4Dut5Muo2@kernel.org>
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@gmail.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!
next prev parent reply other threads:[~2026-01-04 20:58 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-02 6:59 [PATCH v2 00/28] arch, mm: consolidate hugetlb early reservation Mike Rapoport
2026-01-02 6:59 ` [PATCH v2 01/28] alpha: introduce arch_zone_limits_init() Mike Rapoport
2026-01-02 6:59 ` [PATCH v2 02/28] arc: " Mike Rapoport
2026-01-02 6:59 ` [PATCH v2 03/28] arm: " Mike Rapoport
2026-01-02 6:59 ` [PATCH v2 04/28] arm64: " Mike Rapoport
2026-01-02 6:59 ` [PATCH v2 05/28] csky: " Mike Rapoport
2026-01-02 6:59 ` [PATCH v2 06/28] hexagon: " Mike Rapoport
2026-01-02 6:59 ` [PATCH v2 07/28] loongarch: " Mike Rapoport
2026-01-02 6:59 ` [PATCH v2 08/28] m68k: " Mike Rapoport
2026-01-02 6:59 ` [PATCH v2 09/28] microblaze: " Mike Rapoport
2026-01-02 6:59 ` [PATCH v2 10/28] mips: " Mike Rapoport
2026-01-02 6:59 ` [PATCH v2 11/28] nios2: " Mike Rapoport
2026-01-02 6:59 ` [PATCH v2 12/28] openrisc: " Mike Rapoport
2026-01-03 5:36 ` Stafford Horne
2026-01-02 6:59 ` [PATCH v2 13/28] parisc: " Mike Rapoport
2026-01-02 6:59 ` [PATCH v2 14/28] powerpc: " Mike Rapoport
2026-01-02 6:59 ` [PATCH v2 15/28] riscv: " Mike Rapoport
2026-01-02 6:59 ` [PATCH v2 16/28] s390: " Mike Rapoport
2026-01-02 6:59 ` [PATCH v2 17/28] sh: " Mike Rapoport
2026-01-02 6:59 ` [PATCH v2 18/28] sparc: " Mike Rapoport
2026-01-02 6:59 ` [PATCH v2 19/28] um: " Mike Rapoport
2026-01-02 6:59 ` [PATCH v2 20/28] x86: " Mike Rapoport
2026-01-02 6:59 ` [PATCH v2 21/28] xtensa: " Mike Rapoport
2026-01-02 6:59 ` [PATCH v2 22/28] arch, mm: consolidate initialization of nodes, zones and memory map Mike Rapoport
2026-01-02 23:33 ` Klara Modin
2026-01-03 18:54 ` Mike Rapoport
2026-01-03 20:32 ` Klara Modin
2026-01-04 12:01 ` [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) Mike Rapoport
2026-01-04 20:56 ` Russell King (Oracle) [this message]
2026-01-04 22:07 ` Mike Rapoport
2026-01-02 6:59 ` [PATCH v2 23/28] arch, mm: consolidate initialization of SPARSE memory model Mike Rapoport
2026-01-02 7:00 ` [PATCH v2 24/28] mips: drop paging_init() Mike Rapoport
2026-01-02 7:00 ` [PATCH v2 25/28] x86: don't reserve hugetlb memory in setup_arch() Mike Rapoport
2026-01-02 7:00 ` [PATCH v2 26/28] mm, arch: consolidate hugetlb CMA reservation Mike Rapoport
2026-01-02 7:00 ` [PATCH v2 27/28] mm/hugetlb: drop hugetlb_cma_check() Mike Rapoport
2026-01-02 7:00 ` [PATCH v2 28/28] Revert "mm/hugetlb: deal with multiple calls to hugetlb_bootmem_alloc" Mike Rapoport
2026-01-02 18:03 ` [PATCH v2 00/28] arch, mm: consolidate hugetlb early reservation Frank van der Linden
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aVrUDeSkqqY9ZCtS@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=Liam.Howlett@oracle.com \
--cc=agordeev@linux.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=alexs@kernel.org \
--cc=andreas@gaisler.com \
--cc=bcain@kernel.org \
--cc=bp@alien8.de \
--cc=catalin.marinas@arm.com \
--cc=chenhuacai@kernel.org \
--cc=chleroy@kernel.org \
--cc=corbet@lwn.net \
--cc=dave.hansen@linux.intel.com \
--cc=davem@davemloft.net \
--cc=david@kernel.org \
--cc=deller@gmx.de \
--cc=dinguyen@kernel.org \
--cc=geert@linux-m68k.org \
--cc=glaubitz@physik.fu-berlin.de \
--cc=gor@linux.ibm.com \
--cc=guoren@kernel.org \
--cc=hca@linux.ibm.com \
--cc=jcmvbkbc@gmail.com \
--cc=johannes@sipsolutions.net \
--cc=klarasmodin@gmail.com \
--cc=linmag7@gmail.com \
--cc=linux-alpha@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-csky@vger.kernel.org \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-hexagon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-openrisc@vger.kernel.org \
--cc=linux-parisc@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-s390@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=linux-snps-arc@lists.infradead.org \
--cc=linux-um@lists.infradead.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=loongarch@lists.linux.dev \
--cc=lorenzo.stoakes@oracle.com \
--cc=mattst88@gmail.com \
--cc=mhocko@suse.com \
--cc=mingo@redhat.com \
--cc=monstr@monstr.eu \
--cc=mpe@ellerman.id.au \
--cc=muchun.song@linux.dev \
--cc=osalvador@suse.de \
--cc=palmer@dabbelt.com \
--cc=pratyush@kernel.org \
--cc=richard@nod.at \
--cc=rppt@kernel.org \
--cc=shorne@gmail.com \
--cc=sparclinux@vger.kernel.org \
--cc=surenb@google.com \
--cc=tglx@linutronix.de \
--cc=tsbogend@alpha.franken.de \
--cc=vbabka@suse.cz \
--cc=vgupta@kernel.org \
--cc=will@kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox