lkml.org 
[lkml]   [2022]   [May]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 01/12] iommu/vt-d: Use iommu_get_domain_for_dev() in debugfs
    On Tue, May 31, 2022 at 11:02:06AM +0800, Baolu Lu wrote:

    > For case 2, it is a bit weird. I tried to add a rwsem lock to make the
    > iommu_unmap() and dumping tables in debugfs exclusive. This does not
    > work because debugfs may depend on the DMA of the devices to work. It
    > seems that what we can do is to allow this race, but when we traverse
    > the page table in debugfs, we will check the validity of the physical
    > address retrieved from the page table entry. Then, the worst case is to
    > print some useless information.

    Sounds horrible, don't you have locking around the IOPTEs of some
    kind? How does updating them work reliably?

    It is just debugfs, so maybe it is not the end of the world, but
    still..

    Jason

    \
     
     \ /
      Last update: 2022-05-31 15:11    [W:3.451 / U:0.068 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site