HomeFreeBSD

linuxkpi: Fix assertion in `lkpi_vmf_insert_pfn_prot_locked()`

Description

linuxkpi: Fix assertion in lkpi_vmf_insert_pfn_prot_locked()

Before this change, the assertion would not catch a page index matching
the end address, even though the end address of a mapping is outside of
that mapping.

While here, add another assertion to catch page indexes outside of the
expected range earlier.

Also, pagefaulting an address outside of the mapping range should return
VM_FAULT_SIGBUS instead of panicing.

Reviewed by: bz
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D58194

Details

Provenance
dumbbellAuthored on Jun 25 2026, 11:07 PM
Reviewer
bz
Differential Revision
D58194: linuxkpi: Fix assertion in `lkpi_vmf_insert_pfn_prot_locked()`
Parents
rGb712bb84a7a7: tcp: fix TCPS_CLOSED state underleak in syncache_socket()
Branches
Unknown
Tags
Unknown