lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b8a7ab77-935d-459c-7f65-628fcf828fad@linux.intel.com>
Date:   Fri, 24 Jun 2022 14:54:53 +0800
From:   Baolu Lu <baolu.lu@...ux.intel.com>
To:     Ethan Zhao <haifeng.zhao@...ux.intel.com>,
        Joerg Roedel <joro@...tes.org>,
        Kevin Tian <kevin.tian@...el.com>,
        Ashok Raj <ashok.raj@...el.com>
Cc:     baolu.lu@...ux.intel.com, Chenyi Qiang <chenyi.qiang@...el.com>,
        Liu Yi L <yi.l.liu@...el.com>,
        Jacob jun Pan <jacob.jun.pan@...el.com>,
        iommu@...ts.linux-foundation.org, iommu@...ts.linux.dev,
        linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH v3 1/1] iommu/vt-d: Fix RID2PASID setup/teardown failure

On 2022/6/24 14:02, Ethan Zhao wrote:
> 在 2022/6/23 14:57, Lu Baolu 写道:
>> The IOMMU driver shares the pasid table for PCI alias devices. When the
>> RID2PASID entry of the shared pasid table has been filled by the first
>> device, the subsequent device will encounter the "DMAR: Setup RID2PASID
>> failed" failure as the pasid entry has already been marked as present.
>> As the result, the IOMMU probing process will be aborted.
>>
>> On the contrary, when any alias device is hot-removed from the system,
>> for example, by writing to /sys/bus/pci/devices/.../remove, the shared
>> RID2PASID will be cleared without any notifications to other devices.
>> As the result, any DMAs from those rest devices are blocked.
>>
>> Sharing pasid table among PCI alias devices could save two memory pages
>> for devices underneath the PCIe-to-PCI bridges. Anyway, considering that
>> those devices are rare on modern platforms that support VT-d in scalable
>> mode and the saved memory is negligible, it's reasonable to remove this
>> part of immature code to make the driver feasible and stable.
> In my understanding, thus cleanning will make the pasid table become
> per-dev datastructure whatever the dev is pci-alias or not, and the
> pasid_pte_is_present(pte)will only check against every pci-alias' own
> private pasid table,the setup stagewouldn't break, so does the
> detach/release path, and little value to code otherreference counter
> like complex implenmataion, looks good to me !

Thanks! Can I add a Reviewd-by from you?

Best regards,
baolu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ