Patch "iommu/vt-d: Fix identity map bounds in si_domain_init()" has been added to the 6.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    iommu/vt-d: Fix identity map bounds in si_domain_init()

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     iommu-vt-d-fix-identity-map-bounds-in-si_domain_init.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 891dfa570e8f0b630fa3da3d69f0dd25d232fa76
Author: Jon Pan-Doh <pandoh@xxxxxxxxxx>
Date:   Tue Jul 9 16:49:13 2024 -0700

    iommu/vt-d: Fix identity map bounds in si_domain_init()
    
    [ Upstream commit 31000732d56b43765d51e08cccb68818fbc0032c ]
    
    Intel IOMMU operates on inclusive bounds (both generally aas well as
    iommu_domain_identity_map()). Meanwhile, for_each_mem_pfn_range() uses
    exclusive bounds for end_pfn. This creates an off-by-one error when
    switching between the two.
    
    Fixes: c5395d5c4a82 ("intel-iommu: Clean up iommu_domain_identity_map()")
    Signed-off-by: Jon Pan-Doh <pandoh@xxxxxxxxxx>
    Tested-by: Sudheer Dantuluri <dantuluris@xxxxxxxxxx>
    Suggested-by: Gary Zibrat <gzibrat@xxxxxxxxxx>
    Reviewed-by: Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>
    Reviewed-by: Kevin Tian <kevin.tian@xxxxxxxxx>
    Link: https://lore.kernel.org/r/20240709234913.2749386-1-pandoh@xxxxxxxxxx
    Signed-off-by: Will Deacon <will@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
index 744e4e6b8d72d..9918af222c516 100644
--- a/drivers/iommu/intel/iommu.c
+++ b/drivers/iommu/intel/iommu.c
@@ -2411,7 +2411,7 @@ static int __init si_domain_init(int hw)
 		for_each_mem_pfn_range(i, nid, &start_pfn, &end_pfn, NULL) {
 			ret = iommu_domain_identity_map(si_domain,
 					mm_to_dma_pfn_start(start_pfn),
-					mm_to_dma_pfn_end(end_pfn));
+					mm_to_dma_pfn_end(end_pfn-1));
 			if (ret)
 				return ret;
 		}




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux