Since ASLR got enabled for ELFv2, the random bases for the heap, the
dynamic linker and PIE binaries can land anywhere in the 52-bit address
space radix gives us. A lot of userland doesn't like that: SpiderMonkey,
JavaScriptCore, QV4 and friends pack pointers into 47 or 48 bits and
crash on startup (gjs, cjs, qml, ...).
Do what amd64 does on LA57 hardware: keep the full range in the kernel
and give processes a smaller map by default through a second set of
sysvecs. The default is 48 bits (256 TiB), the same as arm64.
One caveat for 48 bits: SpiderMonkey's GC allocator has no fallback
there and relies on mmap(2) hints staying 1 MiB-aligned, which ASLR on
FreeBSD breaks (hinted mappings move in 4 KiB steps, 64 KiB on arm64).
The versions in ports need Mozilla's bug 1876632 (MAP_ALIGNED on
FreeBSD, in Firefox 143) to be reliable; with it gjs runs clean.
The full 52 bits stay available per process through the la52 feature
control note (elfctl(1)) and PROC_LA_CTL (proccontrol(1)), and
vm.pmap.prefer_uva_la48 flips the default. la52 is the powerpc64 name
for the note bit amd64 calls la57, the procctl(2) values are the same.
This will land as three commits: proccontrol, then the kernel, then
elfctl. proccontrol has to go first, otherwise it stops building on
powerpc64 as soon as machine/procctl.h starts defining PROC_LA_CTL.
Fixes: 30ed27ff2556 ("sys/powerpc/powerpc/elf64_machdep.c: enable ASLR on ELFv2")
MFC after: 3 days