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: <BN9PR11MB52765F6D915656C6AFD138FF8C39A@BN9PR11MB5276.namprd11.prod.outlook.com>
Date:   Wed, 19 Jul 2023 03:14:57 +0000
From:   "Tian, Kevin" <kevin.tian@...el.com>
To:     Anshuman Khandual <anshuman.khandual@....com>,
        Alistair Popple <apopple@...dia.com>,
        "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>
CC:     "ajd@...ux.ibm.com" <ajd@...ux.ibm.com>,
        "catalin.marinas@....com" <catalin.marinas@....com>,
        "fbarrat@...ux.ibm.com" <fbarrat@...ux.ibm.com>,
        "iommu@...ts.linux.dev" <iommu@...ts.linux.dev>,
        "jgg@...pe.ca" <jgg@...pe.ca>,
        "jhubbard@...dia.com" <jhubbard@...dia.com>,
        "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
        "mpe@...erman.id.au" <mpe@...erman.id.au>,
        "nicolinc@...dia.com" <nicolinc@...dia.com>,
        "npiggin@...il.com" <npiggin@...il.com>,
        "robin.murphy@....com" <robin.murphy@....com>,
        "Christopherson,, Sean" <seanjc@...gle.com>,
        "will@...nel.org" <will@...nel.org>,
        "x86@...nel.org" <x86@...nel.org>,
        "zhi.wang.linux@...il.com" <zhi.wang.linux@...il.com>
Subject: RE: [PATCH 0/4] Invalidate secondary IOMMU TLB on permission upgrade

> From: Anshuman Khandual <anshuman.khandual@....com>
> Sent: Wednesday, July 19, 2023 11:04 AM
> 
> On 7/18/23 13:26, Alistair Popple wrote:
> > The main change is to move secondary TLB invalidation mmu notifier
> > callbacks into the architecture specific TLB flushing functions. This
> > makes secondary TLB invalidation mostly match CPU invalidation while
> > still allowing efficient range based invalidations based on the
> > existing TLB batching code.
> >
> > ==========
> > Background
> > ==========
> >
> > The arm64 architecture specifies TLB permission bits may be cached and
> > therefore the TLB must be invalidated during permission upgrades. For
> > the CPU this currently occurs in the architecture specific
> > ptep_set_access_flags() routine.
> >
> > Secondary TLBs such as implemented by the SMMU IOMMU match the CPU
> > architecture specification and may also cache permission bits and
> > require the same TLB invalidations. This may be achieved in one of two
> > ways.
> >
> > Some SMMU implementations implement broadcast TLB maintenance
> > (BTM). This snoops CPU TLB invalidates and will invalidate any
> > secondary TLB at the same time as the CPU. However implementations are
> > not required to implement BTM.
> 
> So, the implementations with BTM do not even need a MMU notifier callback
> for secondary TLB invalidation purpose ? Perhaps mmu_notifier_register()
> could also be skipped for such cases i.e with ARM_SMMU_FEAT_BTM
> enabled ?
> 

Out of curiosity. How does BTM work with device tlb? Can SMMU translate
a TLB broadcast request (based on ASID) into a set of PCI ATS invalidation
requests (based on PCI requestor ID and PASID) in hardware?

If software intervention is required then it might be the reason why mmu
notifier cannot be skipped. With BTM enabled it just means the notifier
callback can skip iotlb invalidation...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ