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: <7f105bae-5def-e125-9391-c774d82ff455@linux.intel.com>
Date:   Thu, 8 Sep 2022 14:13:19 +0800
From:   Baolu Lu <baolu.lu@...ux.intel.com>
To:     "Tian, Kevin" <kevin.tian@...el.com>,
        "iommu@...ts.linux.dev" <iommu@...ts.linux.dev>
Cc:     baolu.lu@...ux.intel.com, Joerg Roedel <joro@...tes.org>,
        Will Deacon <will@...nel.org>,
        Robin Murphy <robin.murphy@....com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/1] iommu/vt-d: Fix possible recursive locking in
 intel_iommu_init()

Hi Kevin,

On 2022/7/25 17:39, Baolu Lu wrote:
> On 2022/7/25 15:40, Tian, Kevin wrote:
>>> From: Baolu Lu <baolu.lu@...ux.intel.com>
>>> Sent: Sunday, July 24, 2022 11:00 AM
>>>
>>> Hi Kevin,
>>>
>>> On 2022/7/21 15:39, Tian, Kevin wrote:
>>>>> From: Lu Baolu <baolu.lu@...ux.intel.com>
>>>>> Sent: Tuesday, July 19, 2022 7:53 AM
>>>>>
>>>>> @@ -88,7 +89,8 @@ extern struct list_head dmar_drhd_units;
>>>>>    static inline bool dmar_rcu_check(void)
>>>>>    {
>>>>>        return rwsem_is_locked(&dmar_global_lock) ||
>>>>> -           system_state == SYSTEM_BOOTING;
>>>>> +           system_state == SYSTEM_BOOTING ||
>>>>> +           (IS_ENABLED(CONFIG_INTEL_IOMMU)
>>>>> && !intel_iommu_enabled);
>>>>>    }
>>>>
>>>> intel_iommu_enabled is 0 if CONFIG_INTEL_IOMMU is not set.
>>>>
>>>> same for other similar checks.
>>>
>>> Sorry that I didn't get your point. If CONFIG_INTEL_IOMMU is not set,
>>> IS_ENABLED(CONFIG_INTEL_IOMMU) is 0. The adding check has no effect.
>>> Did
>>> I miss anything?
>>>
>>
>> My point was that the check on CONFIG_INTEL_IOMMU is unnecessary.
> 
> Oh, if INTEL_IOMMU is not configured, the interrupt remapping could also
> be supported, so we still need the rcu protection. We only relax the rcu
> check when INTEL_IOMMU is configured, but not enabled yet.

The next stepping, we will tie INTEL_IOMMU and VT-d IRQ_REMAPPING
together, that will make the VT-d software simpler.

Joerg also proposed this in another discussion thread:

https://lore.kernel.org/all/YrVPelnOi9nql%2F8C@8bytes.org/

After that, we have no need to add above check anymore. As this is a
quick fix for lockdep splat, we don't need to wait until that done.

Does this work for you?

Best regards,
baolu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ