iommu/arm-smmu-v3: Align invalid range with leaf page size upwards when support RIL
virt inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I401IF CVE: NA ------------------------------ In the __arm_smmu_tlb_inv_range(), the fileds of TLBI CMD is calculated based on the invalid range and the leaf page size, when SMMU supports RIL. It will cause some errors when the invalid range isn't aligned with the leaf page size. 1. The num_pages will be zero, if the invalid range is less than b. Then it will enter an endless loop in __arm_smmu_tlb_inv_range(). 2. The actual invalid range will only be part of the invalid range. If the invalid range is not an integral multiple of the leaf page size. To align invalid range with leaf page size upwards will solve the two issues. Reported-by:Nianyao Tang <tangnianyao@huawei.com> Signed-off-by:
Kunkun Jiang <jiangkunkun@huawei.com> Reviewed-by:
Keqian Zhu <zhukeqian1@huawei.com> Signed-off-by:
Zheng Zengkai <zhengzengkai@huawei.com>
Loading
Please sign in to comment