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: <AM0PR05MB486646314DB2873779F87991D17B0@AM0PR05MB4866.eurprd05.prod.outlook.com>
Date:   Fri, 8 Nov 2019 15:13:23 +0000
From:   Parav Pandit <parav@...lanox.com>
To:     Jiri Pirko <jiri@...nulli.us>
CC:     "alex.williamson@...hat.com" <alex.williamson@...hat.com>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        Saeed Mahameed <saeedm@...lanox.com>,
        "kwankhede@...dia.com" <kwankhede@...dia.com>,
        "leon@...nel.org" <leon@...nel.org>,
        "cohuck@...hat.com" <cohuck@...hat.com>,
        Jiri Pirko <jiri@...lanox.com>,
        "linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>
Subject: RE: [PATCH net-next 08/19] vfio/mdev: Make mdev alias unique among
 all mdevs



> -----Original Message-----
> From: Jiri Pirko <jiri@...nulli.us>
> Sent: Friday, November 8, 2019 4:50 AM
> To: Parav Pandit <parav@...lanox.com>
> Cc: alex.williamson@...hat.com; davem@...emloft.net;
> kvm@...r.kernel.org; netdev@...r.kernel.org; Saeed Mahameed
> <saeedm@...lanox.com>; kwankhede@...dia.com; leon@...nel.org;
> cohuck@...hat.com; Jiri Pirko <jiri@...lanox.com>; linux-
> rdma@...r.kernel.org
> Subject: Re: [PATCH net-next 08/19] vfio/mdev: Make mdev alias unique
> among all mdevs
> 
> Thu, Nov 07, 2019 at 05:08:23PM CET, parav@...lanox.com wrote:
> >Mdev alias should be unique among all the mdevs, so that when such
> >alias is used by the mdev users to derive other objects, there is no
> >collision in a given system.
> >
> >Reviewed-by: Saeed Mahameed <saeedm@...lanox.com>
> >Signed-off-by: Parav Pandit <parav@...lanox.com>
> >---
> > drivers/vfio/mdev/mdev_core.c | 7 +++++++
> > 1 file changed, 7 insertions(+)
> >
> >diff --git a/drivers/vfio/mdev/mdev_core.c
> >b/drivers/vfio/mdev/mdev_core.c index 3bdff0469607..c8cd40366783
> 100644
> >--- a/drivers/vfio/mdev/mdev_core.c
> >+++ b/drivers/vfio/mdev/mdev_core.c
> >@@ -388,6 +388,13 @@ int mdev_device_create(struct kobject *kobj, struct
> device *dev,
> > 			ret = -EEXIST;
> > 			goto mdev_fail;
> > 		}
> >+		if (alias && tmp->alias && !strcmp(alias, tmp->alias)) {
> >+			mutex_unlock(&mdev_list_lock);
> >+			ret = -EEXIST;
> >+			dev_dbg_ratelimited(dev, "Hash collision in alias
> creation for UUID %pUl\n",
> >+					    uuid);
> >+			goto mdev_fail;
> >+		}
> 
> I don't understand why this needs to be a separate patch. This check seems
> to be an inseparable part of mdev alias feature.
> Please squash to the previous patch.
> 
Ok. Cornelia had the same comment too.
The previous patch had relatively more delta, and since this patch can be split functionally,
I kept it as separate one.
Either way works.

> 
> > 	}
> >
> > 	mdev = kzalloc(sizeof(*mdev), GFP_KERNEL);
> >--
> >2.19.2
> >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ