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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZAqIGFnJ8U0s3ffI@nvidia.com>
Date:   Thu, 9 Mar 2023 21:30:00 -0400
From:   Jason Gunthorpe <jgg@...dia.com>
To:     Lu Baolu <baolu.lu@...ux.intel.com>
Cc:     iommu@...ts.linux.dev, Joerg Roedel <joro@...tes.org>,
        Christoph Hellwig <hch@...radead.org>,
        Kevin Tian <kevin.tian@...el.com>,
        Will Deacon <will@...nel.org>,
        Robin Murphy <robin.murphy@....com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 5/6] iommu: Replace device_lock() with group->mutex

On Mon, Mar 06, 2023 at 10:58:03AM +0800, Lu Baolu wrote:
> device_lock() was used in iommu_group_store_type() to prevent the
> devices in an iommu group from being attached by any device driver.
> On the other hand, in order to avoid lock race between group->mutex
> and device_lock(), it limited the usage scenario to the singleton
> groups.
> 
> We already have the DMA ownership scheme to avoid driver attachment
> and group->mutex ensures that device ops are always valid, there's
> no need for device_lock() anymore. Remove device_lock() and the
> singleton group limitation.
> 
> Signed-off-by: Lu Baolu <baolu.lu@...ux.intel.com>
> ---
>  drivers/iommu/iommu.c | 78 +++++++++----------------------------------
>  1 file changed, 16 insertions(+), 62 deletions(-)

Reviewed-by: Jason Gunthorpe <jgg@...dia.com>

Thanks,
Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ