HomeFreeBSD

amd64: Increase sanitizers' static shadow memory reservation

Description

amd64: Increase sanitizers' static shadow memory reservation

Because KASAN shadows the kernel image itself (KMSAN currently does
not), a shadow mapping of the boot stack must be created very early
during boot. pmap_san_enter() reserves a fixed number of pages for the
purpose of creating and mapping this shadow region.

After commit 789df254cc9e ("amd64: Use a larger boot stack"), it could
happen that this reservation is insufficient; this happens when
bootstack crosses a PAGE_SHIFT + KASAN_SHADOW_SCALE_SHIFT boundary.
Update the calculation to take into account the new size of the boot
stack.

Fixes: 789df254cc9e ("amd64: Use a larger boot stack")
Sponsored by: The FreeBSD Foundation

Details

Provenance
markjAuthored on Aug 4 2023, 4:25 PM
Parents
rG9c2823bae92c: pam_krb5: Rename a variable.
Branches
Unknown
Tags
Unknown