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] [day] [month] [year] [list]
Date:   Tue, 24 Oct 2023 01:18:33 +0000
From:   "Tian, Kevin" <kevin.tian@...el.com>
To:     Jason Gunthorpe <jgg@...dia.com>,
        Nicolin Chen <nicolinc@...dia.com>
CC:     "joro@...tes.org" <joro@...tes.org>,
        "will@...nel.org" <will@...nel.org>,
        "robin.murphy@....com" <robin.murphy@....com>,
        "baolu.lu@...ux.intel.com" <baolu.lu@...ux.intel.com>,
        "iommu@...ts.linux.dev" <iommu@...ts.linux.dev>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "Liu, Yi L" <yi.l.liu@...el.com>
Subject: RE: [PATCH v3] iommufd: Only enforce cache coherency in
 iommufd_hw_pagetable_alloc

> From: Jason Gunthorpe <jgg@...dia.com>
> Sent: Tuesday, October 24, 2023 7:05 AM
> 
> On Mon, Oct 23, 2023 at 11:57:00AM -0700, Nicolin Chen wrote:
> > According to the conversion in the following link:
> > https://lore.kernel.org/linux-
> iommu/20231020135501.GG3952@...dia.com/
> >
> > The enforce_cache_coherency should be set/enforced in the hwpt
> allocation
> > routine. The iommu driver in its attach_dev() op should decide whether to
> > reject or not a device that doesn't match with the configuration of cache
> > coherency. Drop the enforce_cache_coherency piece in the attach/replace()
> > and move the remaining "num_devices" piece closer to the refcount that is
> > using it.
> >
> > Accordingly drop its function prototype in the header and mark it static.
> > Also add some extra comments to clarify the expected behaviors.
> >
> > Suggested-by: Kevin Tian <kevin.tian@...el.com>
> > Reviewed-by: Lu Baolu <baolu.lu@...ux.intel.com>
> > Signed-off-by: Nicolin Chen <nicolinc@...dia.com>
> > ---
> > Changelog
> > v3:
> >  * Reworked the first line of the added commets.
> > v2: https://lore.kernel.org/all/20231023035733.27378-1-
> nicolinc@...dia.com/
> >  * Dropped "fixes" tags and merged two patches into one (Jason)
> >  * Added comments to the remaining enforce_cache_coherency call (Jason)
> >    [Please feel free to rephrase, or let me know what to change.]
> >  * Replace "num_devices++" with list_for_each_entry (Baolu)
> > v1: https://lore.kernel.org/all/cover.1697848510.git.nicolinc@nvidia.com/
> >
> >  drivers/iommu/iommufd/device.c          | 20 ++------------------
> >  drivers/iommu/iommufd/hw_pagetable.c    |  9 ++++++++-
> >  drivers/iommu/iommufd/iommufd_private.h |  1 -
> >  3 files changed, 10 insertions(+), 20 deletions(-)
> 
> This looks OK to me, Kevin is it what you think it should be now?
> 

This looks good.

Reviewed-by: Kevin Tian <kevin.tian@...el.com>

Powered by blists - more mailing lists