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
loongarch64: pin the module region base from the hardware VA width
vm_map_base is 0 - (1 << cpu_vabits) and MODULES_VADDR is that plus
PCI_IOSIZE + 2 pages, with nothing randomized in between — so a known width
fixes the base exactly. Until now the quantity fell back to the validation
band: 7e13 candidates for a value that is fully determined.
The width comes from /proc/cpuinfo "Address Sizes ... bits virtual", which
is cpu_vabits + 1 read from CPUCFG1.VALEN — the same field vm_map_base is
computed from. Published unconditionally, unlike the x86_64 branch beside
it which publishes only a width of 48: there a reported 57 is the CPU
capability and the kernel may still run 4-level, so the width does not
state the active layout. LoongArch has no such split.
An mmap boundary probe cannot substitute. TASK_SIZE64 is
1 << min(cpu_vabits, VA_BITS), clamped to the kernel's page-table width,
while vm_map_base uses cpu_vabits unclamped; a 16K/3-level kernel on
cpu_vabits=48 hardware would probe 47 and place the region 128 TiB high.
Recorded in the rule and the component so the asymmetry is not "corrected".
Confirmed on loongarch64-alpine-6.18: the row resolves to a single
candidate, 0xffff000002002000.
0 commit comments