HomeFreeBSD

vm_phys: Check for overlap when adding a segment

Description

vm_phys: Check for overlap when adding a segment

Segments are passed by machine-dependent routines, so explicit checks
will make debugging much easier on very weird machines or when someone
is tweaking these machine-dependent routines. Additionally, this
operation is not performance-sensitive.

For the same reasons, test that we don't reach the maximum number of
physical segments (the compile-time of the internal storage) in
production kernels (replaces the existing KASSERT()).

Reviewed by: markj
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48628

Details

Provenance
olceAuthored on Oct 10 2024, 7:41 AM
Reviewer
markj
Differential Revision
D48628: vm_phys: Check for overlap when adding a segment
Parents
rGf30309abcce4: vm_phys_add_seg(): Check for bad segments, allow empty ones
Branches
Unknown
Tags
Unknown