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: <aV7mwGtyAo7s5yuW@google.com>
Date: Wed, 7 Jan 2026 23:05:36 +0000
From: David Matlack <dmatlack@...gle.com>
To: Raghavendra Rao Ananta <rananta@...gle.com>
Cc: Alex Williamson <alex@...zbot.org>,
	Alex Williamson <alex.williamson@...hat.com>,
	Josh Hilke <jrhilke@...gle.com>, kvm@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 4/6] vfio: selftests: Export more vfio_pci functions

On 2025-12-10 06:14 PM, Raghavendra Rao Ananta wrote:

> -static void vfio_device_bind_iommufd(int device_fd, int iommufd,
> -				     const char *vf_token)
> +int __vfio_device_bind_iommufd(int device_fd, int iommufd, const char *vf_token)
>  {
>  	struct vfio_device_bind_iommufd args = {
>  		.argsz = sizeof(args),
> @@ -314,7 +322,15 @@ static void vfio_device_bind_iommufd(int device_fd, int iommufd,
>  		args.token_uuid_ptr = (u64)token_uuid;
>  	}
>  
> -	ioctl_assert(device_fd, VFIO_DEVICE_BIND_IOMMUFD, &args);
> +	return ioctl(device_fd, VFIO_DEVICE_BIND_IOMMUFD, &args);

For ioctls that return 0 on success and -1 on error, let's follow the
precedent set in iommu.c and return -errno on error from our library
functions. i.e.

       if (ioctl(device_fd, VFIO_DEVICE_BIND_IOMMUFD, &args))
               return -errno;

       return 0;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ