You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PAGE_OFFSET was described by seven overlapping macros, and the one question
that matters to a component -- can THIS binary know the target's base? -- was
asked by none of them. DIRECTMAP_STATIC answers whether the base moves at
runtime, a property of the target kernel; a base can be perfectly static there
and still unknown here, which is the whole x86_32 / arm32 VMSPLIT case.
PAGE_OFFSET_CANDIDATES now states the set an architecture admits, with
PAGE_OFFSET_MIN / _MAX bracketing it and PAGE_OFFSET_KNOWN_AT_BUILD derived
from the two. VMSPLIT_PAGE_OFFSETS and HAVE_VMSPLIT_PAGE_OFFSET are retired;
vmsplit_text_base reads the one list and its gate resolves to the same
architecture as before.
The window is stated explicitly rather than reusing KERNEL_VIRT_VAS_START,
which had quietly acquired the job of naming the lowest split. It is not that
quantity: mips64 starts the kernel address space at 0x8000000000000000 with a
PAGE_OFFSET of 0xffffffff80000000, and loongarch64 and riscv64 are the same
shape. Reading it as the lowest split is right only on the arches that happen
to use it that way, this one included as of the module-band change.
No list on arm64 or riscv64. Their base is arm64_page_offset_for(va_bits), a
function of Q_VA_BITS, which is already a finite set -- a second list would be
two declarations obliged to agree, and riscv64's would have to track kernel
version as well, since SV39 alone has had two bases. The coupling rule stays
the single source of truth.
MIN / _MAX must be literals (they appear in #if arithmetic and static
initialisers, where an array cannot be indexed), so compile time can only
check that they bracket PAGE_OFFSET. The rest is a test that runs per-arch
under test-cross: the window is exactly the set's extremes, the compile-time
default is admissible, the list is descending and duplicate-free, and one
candidate is what KNOWN_AT_BUILD means.
Declarations only -- no behaviour change.
0 commit comments