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]
Date:   Mon, 28 Nov 2022 11:00:59 -0400
From:   Jason Gunthorpe <jgg@...dia.com>
To:     Robin Murphy <robin.murphy@....com>
Cc:     Lu Baolu <baolu.lu@...ux.intel.com>,
        Joerg Roedel <joro@...tes.org>,
        Christoph Hellwig <hch@...radead.org>,
        Kevin Tian <kevin.tian@...el.com>,
        Will Deacon <will@...nel.org>,
        Jean-Philippe Brucker <jean-philippe@...aro.org>,
        Suravee Suthikulpanit <suravee.suthikulpanit@....com>,
        Hector Martin <marcan@...can.st>,
        Sven Peter <sven@...npeter.dev>,
        Rob Clark <robdclark@...il.com>,
        Marek Szyprowski <m.szyprowski@...sung.com>,
        Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
        Andy Gross <agross@...nel.org>,
        Bjorn Andersson <andersson@...nel.org>,
        Yong Wu <yong.wu@...iatek.com>,
        Matthias Brugger <matthias.bgg@...il.com>,
        Heiko Stuebner <heiko@...ech.de>,
        Matthew Rosato <mjrosato@...ux.ibm.com>,
        Orson Zhai <orsonzhai@...il.com>,
        Baolin Wang <baolin.wang@...ux.alibaba.com>,
        Chunyan Zhang <zhang.lyra@...il.com>,
        Chen-Yu Tsai <wens@...e.org>,
        Thierry Reding <thierry.reding@...il.com>,
        iommu@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 20/20] iommu: Rename attach_dev to set_dev

On Mon, Nov 28, 2022 at 01:41:56PM +0000, Robin Murphy wrote:
> On 2022-11-28 06:46, Lu Baolu wrote:
> > With the retirement of the detach_dev callback, the naming of attach_dev
> > isn't meaningful anymore. Rename it to set_dev to restore its real
> > meaning, that is, setting an iommu domain to a device.
> 
> English grammar alert: this part is confusing, since the usual in-context
> reading* of "set[ting] X to Y" is going to imply assigning a value of Y to
> some unique property of X. Given the actual semantic that when we attach the
> device to the domain, we are setting the (current) domain as a property of
> the device, I think the most logical and intuitive abbreviation for this
> method would be set_domain(), where the target device is then clearly
> implied by the argument (as the target domain was for attach_dev()).

This is the iommu_domain_ops, it seems a bit weird to call it
set_domain when it is already acting on a domain object.

set_device_domain()

?

> FWIW I also wouldn't say that "attach" loses its meaning in a context where
> an equivalent "detach" operation is only ever implicit in reattaching to
> something else, however I do agree that it *is* worth switching the
> terminology to clearly differentiate this internal behaviour from the public
> attach/detach API for unmanaged domains.

+1

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ