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: <56205a21-c72f-a460-77a2-4bb4f46f6e08@arm.com>
Date:   Thu, 9 May 2019 17:11:42 +0100
From:   Robin Murphy <robin.murphy@....com>
To:     Lu Baolu <baolu.lu@...ux.intel.com>,
        Tom Murphy <tmurphy@...sta.com>
Cc:     "Tian, Kevin" <kevin.tian@...el.com>,
        Ashok Raj <ashok.raj@...el.com>,
        Dmitry Safonov <dima@...sta.com>, linux-kernel@...r.kernel.org,
        iommu@...ts.linux-foundation.org, jacob.jun.pan@...el.com,
        David Woodhouse <dwmw2@...radead.org>
Subject: Re: [PATCH v3 1/8] iommu: Add ops entry for supported default domain
 type

On 09/05/2019 03:30, Lu Baolu wrote:
> Hi Robin,
> 
> On 5/7/19 6:28 PM, Robin Murphy wrote:
>> On 06/05/2019 16:32, Tom Murphy via iommu wrote:
>>> The AMD driver already solves this problem and uses the generic
>>> iommu_request_dm_for_dev function. It seems like both drivers have the
>>> same problem and could use the same solution. Is there any reason we
>>> can't have use the same solution for the intel and amd driver?
>>>
>>> Could we justĀ  copy the implementation of the AMD driver? It would be
>>> nice to have the same behavior across both drivers especially as we
>>> move to make both drivers use more generic code.
>>
>> TBH I don't think the API really needs to be involved at all here. 
>> Drivers can already not provide the requested default domain type if 
>> they don't support it, so as long as the driver can ensure that the 
>> device ends up with IOMMU or direct DMA ops as appropriate, I don't 
>> see any great problem with drivers just returning a passthrough domain 
>> when a DMA domain was requested, or vice versa (and logging a message 
>> that the requested type was overridden). The only type that we really 
>> do have to honour strictly is non-default (i.e. unmanaged) domains.
> 
> I agree with you that we only have to honor strictly the non-default
> domains. But domain type saved in iommu_domain is consumed in iommu.c
> and exposed to user through sysfs. It's not clean if the iommu driver
> silently replace the default domain.

Right, I did get a bit ahead of myself there - the implicit step before 
that is to fix default domain allocation so that the core actually 
passes the relevant device which it has to hand, such that the IOMMU 
drivers *can* make the right decision up-front.

Robin.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ