Something went wrong. Try again.
lol
Something went wrong. Try again.
nixos: maximise mmap ASLR entropy on x86_64 and AArch64
The Linux default of 28 bits on x86_64 and 18 bits (!) on AArch64 is a legacy holdover; Ubuntu 22.04 LTS and newer use a much more defensible 32 bits here on x86_64, and 33 bits on AArch64. On AArch64, the maximum depends on page size: 33 bits for 4K pages, 31 bits for 16K pages, and 29 bits for 64K pages (e.g. Asahi Linux). We query the kernel config to select the right value. In 32-bit compatibility mode on x86_64 and AArch64, we set 16 bits, the maximum permitted by the size of the address space. Other architectures are left at kernel defaults, since the maximums vary widely (e.g. 24 for riscv64, 18 for loongarch/mips/parisc).
Author edef Date (Apr 18, 2026, 3:08 PM UTC) Commit
Copy SHA
Parent b998b489 b998b489dbb9e8b75752f1999a0ba41a8a80062f Change ID Copy change ID