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:   Mon, 7 Nov 2022 10:13:13 +0200
From:   Leon Romanovsky <leon@...nel.org>
To:     Veerasenareddy Burru <vburru@...vell.com>
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        lironh@...vell.com, aayarekar@...vell.com, sedara@...vell.com,
        sburla@...vell.com, linux-doc@...r.kernel.org,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>
Subject: Re: [PATCH net-next 7/9] octeon_ep: add SRIOV VF creation

On Sun, Nov 06, 2022 at 11:25:21PM -0800, Veerasenareddy Burru wrote:
> Add support to create SRIOV VFs.
> 
> Signed-off-by: Veerasenareddy Burru <vburru@...vell.com>
> Signed-off-by: Sathesh Edara <sedara@...vell.com>
> ---
>  .../ethernet/marvell/octeon_ep/octep_main.c   | 50 +++++++++++++++++++
>  1 file changed, 50 insertions(+)
> 
> diff --git a/drivers/net/ethernet/marvell/octeon_ep/octep_main.c b/drivers/net/ethernet/marvell/octeon_ep/octep_main.c
> index ad5553854467..fa0f3d597eb1 100644
> --- a/drivers/net/ethernet/marvell/octeon_ep/octep_main.c
> +++ b/drivers/net/ethernet/marvell/octeon_ep/octep_main.c
> @@ -1236,11 +1236,61 @@ static void octep_remove(struct pci_dev *pdev)
>  	pci_disable_device(pdev);
>  }
>  
> +static int octep_sriov_disable(struct octep_device *oct)
> +{
> +	struct pci_dev *pdev = oct->pdev;
> +
> +	if (pci_vfs_assigned(oct->pdev)) {
> +		dev_warn(&pdev->dev, "Can't disable SRIOV while VFs are assigned\n");
> +		return -EPERM;
> +	}

I think that PCI core should prevent this.

Thanks

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ