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: <aRJvCK-4cG9zPN8k@google.com>
Date: Mon, 10 Nov 2025 23:02:32 +0000
From: David Matlack <dmatlack@...gle.com>
To: Alex Mastro <amastro@...com>
Cc: Alex Williamson <alex@...zbot.org>, Shuah Khan <shuah@...nel.org>,
	kvm@...r.kernel.org, linux-kselftest@...r.kernel.org,
	linux-kernel@...r.kernel.org, Jason Gunthorpe <jgg@...pe.ca>
Subject: Re: [PATCH 1/4] vfio: selftests: add iova range query helpers

On 2025-11-10 02:32 PM, Alex Mastro wrote:
> On Mon, Nov 10, 2025 at 10:03:54PM +0000, David Matlack wrote:
> > On 2025-11-10 01:10 PM, Alex Mastro wrote:
> > > +
> > > +	hdr = vfio_iommu_info_cap_hdr(buf, VFIO_IOMMU_TYPE1_INFO_CAP_IOVA_RANGE);
> > > +	if (!hdr)
> > > +		goto free_buf;
> > 
> > Is this to account for running on old versions of VFIO? Or are there
> > some scenarios when VFIO can't report the list of IOVA ranges?
> 
> I wanted to avoid being overly assertive in this low-level helper function,
> mostly out of ignorance about where/in which system states this capability may
> not be reported.

Makes sense, but IIUC a failure here will eventually turn into an
assertion failure in all callers that exist today. So there's currently
no reason to plumb it up the stack.

For situations like this, I think we should err on asserting at the
lower level helpers, and only propagating errors up as needed. That
keeps all the happy-path callers simple, and those should be the
majority of callers (if not all callers).

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ