HomeFreeBSD

Make SHMMAXPGS an unsigned long

Description

Make SHMMAXPGS an unsigned long

This is used to calculate sizes that are then stored in unsigned long
fields. Make this unsigned long so the calculations use this type and
not an int that can lead to an integer overflow with a large PAGE_SIZE.

This allows building this on arm64 with PAGE_SIZE of 16k. Further work
will be needed if a 32-bit architecture tries to use a similar sized
page.

Sponsored by: The FreeBSD Foundation

(cherry picked from commit cab496e16cb384de03010d9dea7399cbbfb3c3f9)

Details

Provenance
andrewAuthored on Mar 15 2022, 5:42 PM
Parents
rG5abab0f952ba: Remove a redundant L1_BLOCK == L2_BLOCK check
Branches
Unknown
Tags
Unknown