• J
    iommu/arm-smmu-v3: Disable tagged pointers · 2b76a993
    Jean-Philippe Brucker 提交于
    hulk inclusion
    category: feature
    bugzilla: 14369
    CVE: NA
    -------------------
    
    The ARM architecture has a "Top Byte Ignore" (TBI) option that makes the
    MMU mask out bits [63:56] of an address, allowing a userspace application
    to store data in its pointers. This option is incompatible with PCI ATS.
    
    If TBI is enabled in the SMMU and userspace triggers DMA transactions on
    tagged pointers, the endpoint might create ATC entries for addresses that
    include a tag. Software would then have to send ATC invalidation packets
    for each 255 possible alias of an address, or just wipe the whole address
    space. This is not a viable option, so disable TBI.
    
    The impact of this change is unclear, since there are very few users of
    tagged pointers, much less SVA. But the requirement introduced by this
    patch doesn't seem excessive: a userspace application using both tagged
    pointers and SVA should now sanitize addresses (clear the tag) before
    using them for device DMA.
    Signed-off-by: NJean-Philippe Brucker <jean-philippe.brucker@arm.com>
    Signed-off-by: NFang Lijun <fanglijun3@huawei.com>
    Reviewed-by: NHanjun Guo <guohanjun@huawei.com>
    Reviewed-by: NZhen Lei <thunder.leizhen@huawei.com>
    Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
    2b76a993
arm-smmu-v3-context.c 16.8 KB