[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z2A-OMk82UKOjJzH@shredder>
Date: Mon, 16 Dec 2024 16:50:32 +0200
From: Ido Schimmel <idosch@...sch.org>
To: Michael Chan <michael.chan@...adcom.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com, andrew+netdev@...n.ch,
pavan.chebbi@...adcom.com, andrew.gospodarek@...adcom.com,
Kalesh AP <kalesh-anakkur.purayil@...adcom.com>
Subject: Re: [PATCH net-next 2/6] bnxt_en: Do not allow ethtool -m on an
untrusted VF
On Sun, Dec 15, 2024 at 12:59:39PM -0800, Michael Chan wrote:
> @@ -4480,6 +4486,9 @@ static int bnxt_get_module_eeprom_by_page(struct net_device *dev,
> struct bnxt *bp = netdev_priv(dev);
> int rc;
>
> + if (BNXT_VF(bp) && !BNXT_VF_IS_TRUSTED(bp))
> + return -EPERM;
> +
Nit: You can use 'extack' here to help users understand why the
operation failed.
> rc = bnxt_get_module_status(bp, extack);
> if (rc)
> return rc;
Powered by blists - more mailing lists