Page MenuHomeFreeBSD

Fix an off-by-one in vm_map_pmap_enter().
ClosedPublic

Authored by markj on Dec 4 2019, 5:31 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jun 6, 11:38 AM
Unknown Object (File)
May 1 2024, 11:57 PM
Unknown Object (File)
Jan 1 2024, 4:06 AM
Unknown Object (File)
Dec 20 2023, 5:23 AM
Unknown Object (File)
Sep 1 2023, 1:36 AM
Unknown Object (File)
Sep 1 2023, 1:35 AM
Unknown Object (File)
Sep 1 2023, 1:32 AM
Unknown Object (File)
Sep 1 2023, 1:23 AM
Subscribers

Details

Summary

The set of valid pindices in an object of size N is [0, N-1]. I
believe this bug is harmless: we would set psize = 0, causing the
remainder of vm_map_pmap_enter() to do nothing.

Submitted by: Wuyang Chung <wuyang.chung1@gmail.com>

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Dec 4 2019, 5:45 PM
alc added inline comments.
sys/vm/vm_map.c
2459–2460 ↗(On Diff #65218)

As an aside, I want to ask if we can't retire pmap_object_init_pt(). More precisely, hasn't vm_fault_populate() subsumed the essential point of pmap_object_init_pt(), to create superpage mappings for some devices, like frame buffers?

This revision was automatically updated to reflect the committed changes.
sys/vm/vm_map.c
2459–2460 ↗(On Diff #65218)

Would the idea be to provide a default populate method for DEVICE and SG objects?