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]
Date:   Fri, 11 Aug 2023 04:17:26 +0000
From:   "Tian, Kevin" <kevin.tian@...el.com>
To:     Baolu Lu <baolu.lu@...ux.intel.com>, Jason Gunthorpe <jgg@...pe.ca>
CC:     Joerg Roedel <joro@...tes.org>, Will Deacon <will@...nel.org>,
        "Robin Murphy" <robin.murphy@....com>,
        Jean-Philippe Brucker <jean-philippe@...aro.org>,
        Nicolin Chen <nicolinc@...dia.com>,
        "Liu, Yi L" <yi.l.liu@...el.com>,
        Jacob Pan <jacob.jun.pan@...ux.intel.com>,
        "iommu@...ts.linux.dev" <iommu@...ts.linux.dev>,
        "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v2 03/12] iommu: Remove unrecoverable fault data

> From: Baolu Lu <baolu.lu@...ux.intel.com>
> Sent: Friday, August 11, 2023 9:16 AM
> 
> On 2023/8/11 0:46, Jason Gunthorpe wrote:
> > On Thu, Aug 10, 2023 at 10:27:21AM +0800, Baolu Lu wrote:
> >> On 2023/8/10 0:59, Jason Gunthorpe wrote:
> >>> On Thu, Jul 27, 2023 at 01:48:28PM +0800, Lu Baolu wrote:
> >>>> The unrecoverable fault data is not used anywhere. Remove it to avoid
> >>>> dead code.
> >>>>
> >>>> Suggested-by: Kevin Tian<kevin.tian@...el.com>
> >>>> Signed-off-by: Lu Baolu<baolu.lu@...ux.intel.com>
> >>>> ---
> >>>>    include/linux/iommu.h | 70 +------------------------------------------
> >>>>    1 file changed, 1 insertion(+), 69 deletions(-)
> >>> Do we plan to bring this back in some form? A driver specific fault
> >>> report via iommufd?
> >> I can hardly see the possibility.
> >>
> >> The only necessary dma fault messages are the offending address and the
> >> permissions. With these, the user space device model software knows
> that
> >> "a DMA fault was generated when the IOMMU hardware tried to translate
> >> the offending address with the given permissions".
> >>
> >> And then, the device model software will walk the page table and figure
> >> out what is missed before injecting the vendor-specific fault messages
> >> to the VM guest.
> > Avoiding walking the page table sounds like a pretty big win if we
> > could manage it by forwarding more event data..
> 
> Fair enough. We can discuss what kind of extra event data could be
> included later when we have real code for dma fault forwarding support
> in iommufd.
> 

I'm afraid there might be cases where VMM cannot rely on the hw event
data. e.g. if there is a misconfiguation in virtual context entry or ste then
vIOMMU may decide to unmap and leave IOAS empty to trigger
unrecoverable fault when any DMA comes. Then upon notification vIOMMU
needs to check virtual context entry/ste to decide the right error code when
injecting unrecoverable fault into the guest. Here the hw event data will be
about missing stage-2 mapping hence incorrect.

and this is not a performance critical path. 😊

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ