Bug #8623
IMMU_CONTIG_PADDR is broken for cookies with more than one page
100%
Description
The macro IMMU_CONTIG_PADDR() is used to check whether a physical address would be contiguously following the physical memory block described by a cookie. Yet the macro doesn't look at the number of pages in a cookie, so whenever a cookie already has 2 pages it will return false even if the physical address is contiguous.
This leads to the use of a unnecessarily high number of cookies, and in the worst case may trigger #8622.
Updated by Hans Rosenfeld over 3 years ago
Webrev: https://grumpf.hope-2000.org/illumos-8622-8623-8625/
The fix was tested on a system with IOMMU enabled. As expected the number of used cookies went down drastically as contiguous physical addresses were now correctly detected as such.
This change has been in illumos-joyent since around June.
Updated by Electric Monk over 3 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
git commit 2cedd8f0ecbd2b29bf0aac72bb8b7413b0326938
commit 2cedd8f0ecbd2b29bf0aac72bb8b7413b0326938 Author: Hans Rosenfeld <hans.rosenfeld@joyent.com> Date: 2017-09-20T18:35:31.000Z 8622 panic in PTE_set_all() 8623 IMMU_CONTIG_PADDR is broken for cookies with more than one page 8625 nvme causes bad free panic in IOMMU Reviewed by: Robert Mustacchi <rm@joyent.com> Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com> Approved by: Garrett D'Amore <garrett@damore.org>