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: <20240213194556.GA1219770@bhelgaas>
Date: Tue, 13 Feb 2024 13:45:56 -0600
From: Bjorn Helgaas <helgaas@...nel.org>
To: Leon Romanovsky <leonro@...dia.com>
Cc: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@...ux.intel.com>,
	Jim Harris <jim.harris@...sung.com>,
	Bjorn Helgaas <bhelgaas@...gle.com>, linux-pci@...r.kernel.org,
	linux-kernel@...r.kernel.org, Jason Gunthorpe <jgg@...dia.com>,
	Alex Williamson <alex.williamson@...hat.com>,
	Pierre Crégut <pierre.cregut@...nge.com>
Subject: Re: [PATCH v2 1/2] PCI/IOV: Revert "PCI/IOV: Serialize sysfs
 sriov_numvfs reads vs writes"

On Tue, Feb 13, 2024 at 07:46:02PM +0200, Leon Romanovsky wrote:
> On Tue, Feb 13, 2024 at 09:59:54AM -0600, Bjorn Helgaas wrote:
> ...

> > I guess that means that if we apply this revert, the problem Pierre
> > reported will return.  Obviously the deadlock is more important than
> > the inconsistency Pierre observed, but from the user's point of view
> > this will look like a regression.
> > 
> > Maybe listening to netlink and then looking at sysfs isn't the
> > "correct" way to do this, but I don't want to just casually break
> > existing user code.  If we do contemplate doing the revert, at the
> > very least we should include specific details about what the user code
> > *should* do instead, at the level of the actual commands to use
> > instead of "ip monitor dev; cat ${path}/device/sriov_numvfs".
> 
> udevadm monitor will do the trick.
> 
> Another possible solution is to refactor the code to make sure that
> .probe on VFs happens only after sriov_numvfs is updated.

I like the idea of refactoring it so as to preserve the existing
ordering while also fixing the deadlock.

If, in addition, we want to update the sriov_numvfs documentation to
recommend "udevadm monitor" + /sys/.../sriov_numvfs, that's fine, too,
but I don't really like the idea of merging a patch and forcing users
to update their code.

So I'll table the v2 series for now and watch for a v3 with the
refactoring.

Bjorn

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ