On Sat, 8 Nov 2025, Arnd Bergmann wrote:
On other architectures, I see that parisc (always aliasing) has stubbed out the vdso functions, while mips/loongson has limited the page size selection to never alias. A few other mips platforms can theoretically enable both small pages and vdso, but my guess is that in practice they don't use the vdso (mips32/ath79) or they use 16KB pages (rm, dec, ip22) based on the defconfig settings.
Umm, I'd have to dive into the details (and I hardly have the resources at hand), but quite a bunch of MIPS microarchitectures suffer from cache aliases; some even have VIVT caches. A quick check with a system I have running at my lab:
$ ldd /bin/true linux-vdso.so.1 => (0x77ff4000) libc.so.6 => /lib/libc.so.6 (0x77e50000) /lib/ld.so.1 (0x77fcc000) $ getconf PAGESIZE 4096 $ dmesg | grep linesize Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes. Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes MIPS secondary cache 512kB, 8-way, linesize 32 bytes. $
Some microarchitectures have aliasing prevention implemented in hardware, e.g. with the MTI 24K core:
Table 6-31 Config7 Register Field Descriptions -------------+---------------------------------------------+-------+--------- Fields | | | ------+------+ | Read/ | Reset Name | Bits | Description | Write | State ======+======+=============================================+=======+========= | | Alias removed: This bit indicates that the | | | | data cache is organized to avoid virtual | | AR | 16 | aliasing problems. This bit is only set if | R | Based | | the data cache config and MMU type would | | on HW | | normally cause aliasing - i.e., only for | | present | | the 32KB data cache and TLB-based MMU. | | ------+------+---------------------------------------------+-------+---------
But this is entirely optional and not architecturally guaranteed; Config7 is a vendor space register.
DEC platforms have a selectable page size (for R4k CPUs; R3k CPUs have a PIPT write-through cache, so no issue with aliasing ever) and 4KiB is the common choice, but they never suffer from aliases as the hardware resolves them. It's not completely transparent as with the 24K option shown above, as a virtual coherency exception is triggered instead, at separate levels for the I$ and D$ each, and we handle it in software:
$ getconf PAGESIZE 4096 $ dmesg | grep linesize Primary instruction cache 16kB, VIPT, direct mapped, linesize 16 bytes. Primary data cache 16kB, direct mapped, VIPT, cache aliases, linesize 16 bytes Unified secondary cache 1024kB direct mapped, linesize 32 bytes. $ uptime 02:46:16 up 250 days, 4:03, 2 users, load average: 0.01, 0.01, 0.00 $ cat /proc/cpuinfo system type : Digital DECstation 5000/2x0 machine : Unknown processor : 0 cpu model : R4400SC V4.0 FPU V0.0 BogoMIPS : 59.60 wait instruction : no microsecond timers : yes tlb_entries : 48 extra interrupt vector : no hardware watchpoint : yes, count: 0, address/irw mask: [] isa : mips1 mips2 mips3 ASEs implemented : Options implemented : tlb 4kex 4k_cache fpu 32fpr cache_cdex_p cache_cdex_s llsc dc_aliases inclusive_pcaches nan_legacy shadow register sets : 1 kscratch registers : 0 package : 0 core : 0 VCED exceptions : 372522 VCEI exceptions : 16922804
$
(see the figures at the bottom; uptime quoted for an idea of the rate, though the system hasn't been heavily loaded). It is possible with the aid of S$, which is inclusive and PIPT.
FWIW,
Maciej