Skip to content
  • Robin Murphy's avatar
    iommu/iova: Make rcache limit_pfn handling more robust · b826ee9a
    Robin Murphy authored
    
    
    When popping a pfn from an rcache, we are currently checking it directly
    against limit_pfn for viability. Since this represents iova->pfn_lo, it
    is technically possible for the corresponding iova->pfn_hi to be greater
    than limit_pfn. Although we generally get away with it in practice since
    limit_pfn is typically a power-of-two boundary and the IOVAs are
    size-aligned, it's pretty trivial to make the iova_rcache_get() path
    take the allocation size into account for complete safety.
    
    Signed-off-by: default avatarRobin Murphy <robin.murphy@arm.com>
    Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
    b826ee9a