HomeFreeBSD

For hw.{physmem,realmem,usermem} MIBs, clamp instead truncating.

Description

For hw.{physmem,realmem,usermem} MIBs, clamp instead truncating.

If the memory size does not fit into u_long, current code truncates
the returned value and returns complete nonsense. Make the result
slightly more useful by clamping it at ULONG_MAX.

Reported and tested : pho
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

Details

Provenance
kibAuthored on
Parents
rS342594: i386: Fix allocation of the KVA frame for pmap_quick_enter_page().
Branches
Unknown
Tags
Unknown