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]
Message-ID: <31f7cee6-730c-7ca1-5107-358b8aa8f7b9@arm.com>
Date:   Mon, 1 Apr 2019 11:10:23 +0100
From:   Jean-Philippe Brucker <jean-philippe.brucker@....com>
To:     Joerg Roedel <joro@...tes.org>
Cc:     kevin.tian@...el.com, alex.williamson@...hat.com,
        ashok.raj@...el.com, zhangfei.gao@...mail.com,
        linux-kernel@...r.kernel.org, iommu@...ts.linux-foundation.org,
        christian.koenig@....com
Subject: Re: [PATCH v2 1/1] iommu: Bind process address spaces to devices

Hi Joerg,

On 25/03/2019 14:44, Joerg Roedel wrote:
> Hey Jean-Philippe,
> 
> thanks for the patch, I think we are on the finish line with this
> interface. Just one small question below.
> 
> On Wed, Mar 20, 2019 at 03:02:58PM +0000, Jean-Philippe Brucker wrote:
>> +int iommu_sva_set_ops(struct iommu_sva *handle,
>> +		      const struct iommu_sva_ops *sva_ops)
>> +{
>> +	const struct iommu_ops *ops = handle->dev->bus->iommu_ops;
>> +
>> +	if (!ops || !ops->sva_set_ops)
>> +		return -ENODEV;
>> +
>> +	return ops->sva_set_ops(handle, sva_ops);
>> +}
> 
> What is the purpose of the sva_set_ops call-back in iommu-ops? Is the
> IOMMU driver supposed to do some extra setup work with the provided ops?
> Otherwise we can just store the pointer in 'struct iommu_sva' without
> calling into the iommu driver.

Right that would be simpler. I added the sva_set_ops callback so that
IOMMU driver can use the same lock in unbind() and sva_set_ops(). But I
think it's safe to assume that device drivers don't call unbind() before
setting the ops.

Thanks,
Jean

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ