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] [day] [month] [year] [list]
Message-ID: <20210811115714.GB7008@nvidia.com>
Date:   Wed, 11 Aug 2021 08:57:14 -0300
From:   Jason Gunthorpe <jgg@...dia.com>
To:     Alex Williamson <alex.williamson@...hat.com>
Cc:     Christoph Hellwig <hch@...radead.org>,
        linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
        peterx@...hat.com
Subject: Re: [PATCH 3/7] vfio/pci: Use vfio_device_unmap_mapping_range()

On Tue, Aug 10, 2021 at 03:50:58PM -0600, Alex Williamson wrote:
> On Tue, 10 Aug 2021 13:55:00 +0100
> Christoph Hellwig <hch@...radead.org> wrote:
> 
> > On Tue, Aug 10, 2021 at 08:57:22AM -0300, Jason Gunthorpe wrote:
> > > I'm not sure there is a real performance win to chase here? Doesn't
> > > this only protect mmap against reset? The mmap isn't performance
> > > sensitive, right?
> > > 
> > > If this really needs extra optimization adding a rwsem to the devset
> > > and using that across the whole set would surely be sufficient.  
> > 
> > Every mmio read or write takes memory_lock.
> 
> Exactly.  Ideally we're not using that path often, but I don't think
> that's a good excuse to introduce memory access serialization, or even
> dependencies between devices.  Thanks,

But a cross device rwsem seems OK to me?? It won't contend unless we
are trying to reset and the upgrade to a percpu rwsem to optimize
the atomic doesn't seem warranted since this path already has a vmexit
and a syscall in it?

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ