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: <33c4755d-6a0f-4734-88e0-84f0de67b652@linux.intel.com>
Date: Wed, 26 Feb 2025 13:18:44 +0800
From: Baolu Lu <baolu.lu@...ux.intel.com>
To: Ethan Zhao <haifeng.zhao@...ux.intel.com>, Jason Gunthorpe <jgg@...pe.ca>
Cc: Yunhui Cui <cuiyunhui@...edance.com>, dwmw2@...radead.org,
 joro@...tes.org, will@...nel.org, robin.murphy@....com,
 iommu@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] iommu/vt-d: fix system hang on reboot -f

On 2/26/25 11:50, Ethan Zhao wrote:
>>>>>
>> If the schedular doesn't run how did we get from 4 -> 5?
>>
>> Maybe the issue is the shutdown handler here is running in the wrong
>> time and it should not be running after the scheduler has been shut
>> down.
>>
>> I don't think removing the lock is a great idea without more
>> explanation.
> 
> Seems it is not so simple job to explain why there is no race window 
> between
> this iommu_shutdown() and following dmar_global_lock holders.
> 
> 1. PCIe hotplug dmar_pci_bus_notifier()
> 
> 2. mm_core_init detect_intel_iommu()
> 
> 3. late_initcall dmar_free_unused_resources()
> 
> 4. acpi attach dmar_device_hotplug()
> 
> 5. pci_iommu_init intel_iommu_init() init_dmars()
> 
> 6. rootfs_initcall ir_dev_scope_init()
> 
> though here is the last stage of reboot. then how about we turn back to v1
> 
> Just repalce with own_write() with down_write_trylock().

I don't think trylock is a reasonable solution. intel_iommu_shutdown()
should not become a no-op simply because it cannot acquire a lock
immediately.

The lock here is to protect the drhd (representation of iommu hardware)
list. It needs protection because this driver supports iommu hot-add and
remove, which is triggered by an ACPI event for I/O board hotplug.
Provided the system does not respond to those events when this function
is called, it's fine to remove the lock.

Thanks,
baolu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ