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: <aWfOfT3vZSWfa4-l@google.com>
Date: Wed, 14 Jan 2026 17:12:29 +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 5/6] vfio: selftests: Add helper to set/override a
 vf_token

On 2026-01-08 01:45 PM, Raghavendra Rao Ananta wrote:
> On Wed, Jan 7, 2026 at 2:56 PM David Matlack <dmatlack@...gle.com> wrote:
> > On 2025-12-10 06:14 PM, Raghavendra Rao Ananta wrote:

> > > +void vfio_device_set_vf_token(int fd, const char *vf_token)
> > > +{
> > > +     uuid_t token_uuid = {0};
> > > +
> > > +     VFIO_ASSERT_NOT_NULL(vf_token, "vf_token is NULL");

nit: Drop the "vf_token is NULL" message. It's unnecessary.

> > > +     VFIO_ASSERT_EQ(uuid_parse(vf_token, token_uuid), 0);
> > > +
> > > +     vfio_device_feature_set(fd, VFIO_DEVICE_FEATURE_PCI_VF_TOKEN,
> > > +                             token_uuid, sizeof(uuid_t));
> > > +}
> >
> > Would it be useful to have a variant that returns an int for negative
> > testing?
> >
> I couldn't see any interesting cases where the ioctl could fail that
> would warrant a negative test.
> The 'incorrect vf token set' is validated later during device init.
> I've implemented a negative test for this.
> 
> However, please let me know if you can think of anything.

I didn't have anything in mind, I was just curious.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ