git: 89669589ce9f - stable/13 - amd64: Ignore 1GB mappings in pmap_advise()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 01 Oct 2022 16:13:25 UTC
The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=89669589ce9fed473d3b95d385ebe45abb1dc878 commit 89669589ce9fed473d3b95d385ebe45abb1dc878 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2022-09-24 13:20:48 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2022-10-01 15:34:19 +0000 amd64: Ignore 1GB mappings in pmap_advise() This assertion can be triggered by usermode since vm_map_madvise() doesn't force advice to be applied to an entire largepage mapping. I can't see any reason not to permit it, however, since MADV_DONTNEED and _FREE are advisory and we can simply do nothing when a 1GB mapping is encountered. Reviewed by: alc, kib (cherry picked from commit 4551cbbe9906812556501c541fef0d88b0398b27) --- sys/amd64/amd64/pmap.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index aa3774524023..6348f4c7acf0 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -8867,13 +8867,8 @@ pmap_advise(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, int advice) pdpe = pmap_pml4e_to_pdpe(pml4e, sva); if ((*pdpe & PG_V) == 0) continue; - if ((*pdpe & PG_PS) != 0) { - KASSERT(va_next <= eva, - ("partial update of non-transparent 1G mapping " - "pdpe %#lx sva %#lx eva %#lx va_next %#lx", - *pdpe, sva, eva, va_next)); + if ((*pdpe & PG_PS) != 0) continue; - } va_next = (sva + NBPDR) & ~PDRMASK; if (va_next < sva)