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: <CAHk-=wiv=Dm5diw2N-4Mx3k8iYWNfyvjzrQxB3JxVLC_7cuY+g@mail.gmail.com>
Date:   Mon, 8 May 2023 10:17:53 -0700
From:   Linus Torvalds <torvalds@...ux-foundation.org>
To:     Jason Gunthorpe <jgg@...dia.com>
Cc:     Jacob Pan <jacob.jun.pan@...ux.intel.com>,
        LKML <linux-kernel@...r.kernel.org>, iommu@...ts.linux.dev,
        Lu Baolu <baolu.lu@...ux.intel.com>,
        Joerg Roedel <joro@...tes.org>,
        Jean-Philippe Brucker <jean-philippe@...aro.com>,
        Robin Murphy <robin.murphy@....com>,
        Will Deacon <will@...nel.org>, Raj Ashok <ashok.raj@...el.com>,
        "Tian, Kevin" <kevin.tian@...el.com>, Yi Liu <yi.l.liu@...el.com>,
        "Yu, Fenghua" <fenghua.yu@...el.com>,
        "Hansen, Dave" <dave.hansen@...el.com>
Subject: Re: [PATCH] iommu: Add Kconfig help text for IOMMU_SVA

On Mon, May 8, 2023 at 9:55 AM Jason Gunthorpe <jgg@...dia.com> wrote:
>
> CONFIG_IOMMU_MM_PASID perhaps? Says what it does without a clue about
> why it does it. x86 arch code could select it ideally?

Maybe we don't even need the "IOMMU" part. It's a core x86
architecture feature. Maybe it usually (always?) gets used within the
framework of some IOMMU work, but I guess ENCQCMD could be used in
some hardwired way even without that (ie is it possible to have just
some "basic PASID set up by VMM environment" thing?)

I don't actually know who uses it and how, so I'm probably not the
right person to name it, but just looking at the x86 code that sets
it, the PASID code technically has no connection to any iommu code,
it's literally a core CPU feature with an MSR and some magic faulting
thing, and seems to be possibly usable as-is.

That existing

    #ifdef CONFIG_IOMMU_SVA

in the x86 traps.c code just looks odd, and making it be
CONFIG_IOMMU_MM_PASID sounds better to me. I'm just not sure about the
"IOMMU" part either. Just "MM_PASID"?

That said, the arm-smmu-v3-sva.c code clearly *also* uses pasid,
except it seems to really want to call it "ssid".

So "having a per-mm ASID for IO" is clearly a common feature. But
naming seems hard, with x86 calling it PASID, arm64 seemingly calling
it "SSID".

Right now the only user *does* seem to be through the IOMMU SVA code,
but that may or may not be fundamental.

Now, "SSID" is a completely horrible name, as I immediately realized
when I tried to google for it. So arm64 is just wrong, and we're most
definitely continuing to call it PASID.

I'd lean towards just "CONFIG_MM_PASID" or something, but at some
point this is bikeshedding, and I don't know about any possible
non-iommu direct uses?

           Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ