All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@idosch.org>
To: Michael Chan <michael.chan@broadcom.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, andrew+netdev@lunn.ch,
	pavan.chebbi@broadcom.com, andrew.gospodarek@broadcom.com,
	Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Subject: Re: [PATCH net-next 2/6] bnxt_en: Do not allow ethtool -m on an untrusted VF
Date: Mon, 16 Dec 2024 16:50:32 +0200	[thread overview]
Message-ID: <Z2A-OMk82UKOjJzH@shredder> (raw)
In-Reply-To: <20241215205943.2341612-3-michael.chan@broadcom.com>

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;

  parent reply	other threads:[~2024-12-16 14:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-15 20:59 [PATCH net-next 0/6] bnxt_en: Driver update Michael Chan
2024-12-15 20:59 ` [PATCH net-next 1/6] bnxt_en: Use FW defined resource limits for RoCE Michael Chan
2024-12-15 20:59 ` [PATCH net-next 2/6] bnxt_en: Do not allow ethtool -m on an untrusted VF Michael Chan
2024-12-16 14:25   ` kernel test robot
2024-12-16 14:50   ` Ido Schimmel [this message]
2024-12-15 20:59 ` [PATCH net-next 3/6] bnxt_en: Skip PHY loopback ethtool selftest if unsupported by FW Michael Chan
2024-12-15 20:59 ` [PATCH net-next 4/6] bnxt_en: Skip MAC loopback selftest if it is " Michael Chan
2024-12-16  6:56   ` Michal Swiatkowski
2024-12-15 20:59 ` [PATCH net-next 5/6] bnxt_en: Skip reading PXP registers during ethtool -d if unsupported Michael Chan
2024-12-15 20:59 ` [PATCH net-next 6/6] MAINTAINERS: bnxt_en: Add Pavan Chebbi as co-maintainer Michael Chan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z2A-OMk82UKOjJzH@shredder \
    --to=idosch@idosch.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=andrew.gospodarek@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kalesh-anakkur.purayil@broadcom.com \
    --cc=kuba@kernel.org \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pavan.chebbi@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.