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: <YO65OOScL5vru1Kr@8bytes.org>
Date:   Wed, 14 Jul 2021 12:15:20 +0200
From:   Joerg Roedel <joro@...tes.org>
To:     Robin Murphy <robin.murphy@....com>
Cc:     Doug Anderson <dianders@...omium.org>,
        Ulf Hansson <ulf.hansson@...aro.org>,
        Linux Doc Mailing List <linux-doc@...r.kernel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        linux-pci@...r.kernel.org,
        Konrad Dybcio <konrad.dybcio@...ainline.org>,
        Thierry Reding <thierry.reding@...il.com>,
        Joel Fernandes <joel@...lfernandes.org>,
        Rajat Jain <rajatja@...gle.com>, Will Deacon <will@...nel.org>,
        Rob Clark <robdclark@...omium.org>,
        Saravana Kannan <saravanak@...gle.com>,
        Jonathan Corbet <corbet@....net>, quic_c_gdjako@...cinc.com,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        Viresh Kumar <viresh.kumar@...aro.org>,
        Veerabhadrarao Badiganti <vbadigan@...eaurora.org>,
        "Paul E. McKenney" <paulmck@...nel.org>,
        linux-arm-msm <linux-arm-msm@...r.kernel.org>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        Sonny Rao <sonnyrao@...omium.org>,
        Vlastimil Babka <vbabka@...e.cz>,
        Randy Dunlap <rdunlap@...radead.org>,
        Linux MMC List <linux-mmc@...r.kernel.org>,
        Adrian Hunter <adrian.hunter@...el.com>,
        LKML <linux-kernel@...r.kernel.org>,
        "list@....net:IOMMU DRIVERS" <iommu@...ts.linux-foundation.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        "Maciej W. Rozycki" <macro@...am.me.uk>
Subject: Re: [PATCH v2 0/3] iommu: Enable non-strict DMA on QCom SD/MMC

Hi Robin,

On Fri, Jul 09, 2021 at 02:56:47PM +0100, Robin Murphy wrote:
> As I mentioned before, conceptually I think this very much belongs in sysfs
> as a user decision. We essentially have 4 levels of "strictness":
> 
> 1: DMA domain with bounce pages
> 2: DMA domain
> 3: DMA domain with flush queue
> 4: Identity domain

Together with reasonable defaults (influenced by compile-time
options) it seems to be a good thing to configure at runtime via
sysfs.

We already have CONFIG_IOMMU_DEFAULT_PASSTHROUGH, which can probably be
extended to be an option list:

	- CONFIG_IOMMU_DEFAULT_PASSTHROUGH: Trusted devices are identity
					    mapped

	- CONFIG_IOMMU_DEFAULT_DMA_STRICT: Trusted devices are DMA
					   mapped with strict flush
					   behavior on unmap

	- CONFIG_IOMMU_DEFAULT_DMA_LAZY: Trusted devices are DMA mapped
					 with flush queues for performance

Untrusted devices always get into the DMA domain with bounce pages by
default.

The defaults can be changed at runtime via sysfs. We already have basic
support for runtime switching of the default domain, so that can be
re-used.

Regards,

	Joerg

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ