When attempting to satisfy mmap() requests for superpage alignment on 64-bit MIPS, use superpage rather than physical-segment constants, or we may improperly fail to apply suitable alignment -- yet still allow mmap() to appear to succeed.
Details
Details
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
Comment Actions
CheriBSD change for reference: https://github.com/CTSRD-CHERI/cheribsd/commit/7ed51f1f4ff2ea4c7ba1cebc101d9dd6e26f3844
Comment Actions
Yes, the superpage size should be 2M (PDRSIZE) for mips64. This looks correct. I am not sure it matters for mips32 given there is no superpage support for it yet. The way it is done for mips64 (see https://reviews.freebsd.org/D2535 ) may not work for mips32 given the limited number of available PTE bits. Of course, the mips64 superpage implementation was designed to support multiple superpage sizes (more than just 2M) although only one superpage size is currently implemented. I imagine with mips32 only one superpage size would be supported.