HomeFreeBSD

Fix divide-by-zero panic when ASLR is enabled and superpages disabled

Description

Fix divide-by-zero panic when ASLR is enabled and superpages disabled

When locating the anonymous memory region for a vm_map with ASLR
enabled, we try to keep the slid base address aligned on a superpage
boundary to minimize pagetable fragmentation and maximize the potential
usage of superpage mappings. We can't (portably) do this if superpages
have been disabled by loader tunable and pagesizes[1] is 0, and it
would be less beneficial in that case anyway.

PR: 253511
Reported by: johannes@jo-t.de
MFC after: 1 week
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D28678

Details

Provenance
jahAuthored on Feb 15 2021, 2:47 AM
Reviewer
kib
Differential Revision
D28678: Fix divide-by-zero panic when ALSR is enabled and superpages disabled
Parents
rG85d6747a694a: bsd.links.mk wants full paths
Branches
Unknown
Tags
Unknown