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]
Date:   Wed, 12 Jan 2022 14:51:10 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Dimitris Michailidis <d.michailidis@...gible.com>
Cc:     davem@...emloft.net, netdev@...r.kernel.org, andrew@...n.ch
Subject: Re: [PATCH net-next v6 3/8] net/funeth: probing and netdev ops

On Sun,  9 Jan 2022 17:56:31 -0800 Dimitris Michailidis wrote:
> +static int funeth_sriov_configure(struct pci_dev *pdev, int nvfs)
> +{
> +	struct fun_dev *fdev = pci_get_drvdata(pdev);
> +	struct fun_ethdev *ed = to_fun_ethdev(fdev);
> +	int rc;
> +
> +	if (nvfs == 0) {
> +		if (pci_vfs_assigned(pdev)) {
> +			dev_warn(&pdev->dev,
> +				 "Cannot disable SR-IOV while VFs are assigned\n");
> +			return -EPERM;
> +		}
> +
> +		pci_disable_sriov(pdev);
> +		fun_free_vports(ed);
> +		return 0;
> +	}
> +
> +	rc = fun_init_vports(ed, nvfs);
> +	if (rc)
> +		return rc;

Also likely needs locking, not that sriov callback is called with
device lock held and VF configuration with rtnl_lock(), they can 
run in parallel.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ