From: sashiko-bot@kernel.org
To: "Eric Curtin" <ericcurtin17@gmail.com>
Cc: "Ryan Roberts" <ryan.roberts@arm.com>,
"Arnd Bergmann" <arnd@arndb.de>,
"Dennis Zhou" <dennis@kernel.org>, "Tejun Heo" <tj@kernel.org>,
"Christoph Lameter" <cl@gentwo.org>,
linux-mm@kvack.org
Subject: Re: [RFC PATCH v2 02/43] vmlinux.lds: Align page-aligned sections to PAGE_SIZE_MAX
Date: Wed, 02 Dec 2026 02:34:45 +0000 [thread overview]
Message-ID: <sashiko-outbox-244662@kernel.org> (raw)
In-Reply-To: <20261201015240.1017259-3-ericcurtin17@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] vmlinux.lds: undefined PAGE_SIZE_MAX breaks MIPS, LoongArch,
and Hexagon link
--
commit 74c3a1f3d7340ae45eb0339d1beede03535034d4
Author: Ryan Roberts <ryan.roberts@arm.com>
vmlinux.lds: Align page-aligned sections to PAGE_SIZE_MAX
This commit updates page-aligned linker script sections in vmlinux.lds.h,
__page_aligned_data, __page_aligned_bss, and per-CPU page-aligned variable
definitions to align to PAGE_SIZE_MAX instead of PAGE_SIZE.
> diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
> index 3eb732942d699..2a86599cb6207 100644
> --- a/include/asm-generic/vmlinux.lds.h
> +++ b/include/asm-generic/vmlinux.lds.h
[ ... ]
> @@ -397,10 +397,10 @@
> * Data section helpers
> */
> #define NOSAVE_DATA \
> - . = ALIGN(PAGE_SIZE); \
> + . = ALIGN(PAGE_SIZE_MAX); \
> __nosave_begin = .; \
> *(.data..nosave) \
> - . = ALIGN(PAGE_SIZE); \
> + . = ALIGN(PAGE_SIZE_MAX); \
> __nosave_end = .;
>
> #define CACHE_HOT_DATA(align) \
> @@ -603,7 +603,7 @@
> *(.text.unknown .text.unknown.*) \
> TEXT_SPLIT \
> TEXT_UNLIKELY \
> - . = ALIGN(PAGE_SIZE); \
> + . = ALIGN(PAGE_SIZE_MAX); \
> TEXT_HOT \
> *(TEXT_MAIN .text.fixup) \
> NOINSTR_TEXT \
[Severity: High]
Does using PAGE_SIZE_MAX in vmlinux.lds.h break linking vmlinux on
architectures whose linker scripts define PAGE_SIZE without including
asm/page.h or asm-generic/pgtable-geometry.h?
For example, arch/mips/kernel/vmlinux.lds.S,
arch/loongarch/kernel/vmlinux.lds.S, and arch/hexagon/kernel/vmlinux.lds.S
do not include asm/page.h when preprocessed with __ASSEMBLY__ and instead
define only PAGE_SIZE from _PAGE_SIZE in asm/asm-offsets.h:
arch/mips/kernel/vmlinux.lds.S:
#include <asm/asm-offsets.h>
#include <asm/thread_info.h>
#define PAGE_SIZE _PAGE_SIZE
When those linker scripts expand macros such as TEXT_TEXT, NOSAVE_DATA,
PERCPU_SECTION, RW_DATA, or BSS_SECTION, PAGE_SIZE_MAX is left unexpanded
in ALIGN(PAGE_SIZE_MAX), causing the vmlinux link to fail.
Should vmlinux.lds.h include <asm-generic/pgtable-geometry.h> (or fall
back to defining PAGE_SIZE_MAX as PAGE_SIZE when undefined)?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261201015240.1017259-1-ericcurtin17@gmail.com?part=2
next prev parent reply other threads:[~2026-12-02 2:34 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 1:51 [RFC PATCH v2 00/43] Boot-time page size selection for arm64 (core) Eric Curtin
2026-12-01 1:51 ` [RFC PATCH v2 02/43] vmlinux.lds: Align page-aligned sections to PAGE_SIZE_MAX Eric Curtin
2026-12-02 2:34 ` sashiko-bot [this message]
2026-12-01 1:51 ` [RFC PATCH v2 03/43] mm: page_frag: Use PAGE_SIZE_MIN/MAX limits in page_frag_cache Eric Curtin
2026-12-01 1:51 ` [RFC PATCH v2 04/43] mm: page_frag: Add _MIN/_MAX variants of PAGE_FRAG_CACHE_MAX_SIZE Eric Curtin
2026-12-01 1:51 ` [RFC PATCH v2 05/43] mm: Avoid split pmd ptl if pmd level is run-time folded Eric Curtin
2026-12-01 1:51 ` [RFC PATCH v2 06/43] mm/vmstat: Use THREAD_SIZE_MAX for the KSTACK_* counters Eric Curtin
2026-12-02 2:34 ` sashiko-bot
2026-12-01 1:51 ` [RFC PATCH v2 07/43] fork: Permit boot-time THREAD_SIZE determination Eric Curtin
2026-12-01 1:51 ` [RFC PATCH v2 21/43] arm64: Test PAGE_SIZE instead of CONFIG_ARM64_*K_PAGES Eric Curtin
2026-12-01 1:51 ` [RFC PATCH v2 25/43] arm64: Size and align the zero page and FDT ptes for PAGE_SIZE_MAX Eric Curtin
2026-12-01 1:52 ` [RFC PATCH v2 30/43] arm64: Support runtime folding of the pmd level Eric Curtin
2026-12-02 2:34 ` sashiko-bot
2026-12-01 1:52 ` [RFC PATCH v2 34/43] mm/damon/lru_sort: Initialise the stub access pattern at boot Eric Curtin
2026-12-01 1:52 ` [RFC PATCH v2 35/43] mm/zsmalloc: Size static limits for the worst-case page size Eric Curtin
2026-12-01 1:52 ` [RFC PATCH v2 38/43] mm: Use fixed sizes for shmem str_dup and swap cache PFN bits Eric Curtin
2026-12-01 1:52 ` [RFC PATCH v2 43/43] arm64: Enable boot-time page size selection Eric Curtin
2026-12-02 2:34 ` sashiko-bot
2026-12-01 10:41 ` [RFC PATCH v2 00/43] Boot-time page size selection for arm64 (core) Lorenzo Stoakes (ARM)
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=sashiko-outbox-244662@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=arnd@arndb.de \
--cc=cl@gentwo.org \
--cc=dennis@kernel.org \
--cc=ericcurtin17@gmail.com \
--cc=linux-mm@kvack.org \
--cc=ryan.roberts@arm.com \
--cc=sashiko-reviews@lists.linux.dev \
--cc=tj@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