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: <CALs4sv1jFBQugb8MXny09Qu+xUj5o+GFnWveh=G3g6-GMsPNow@mail.gmail.com>
Date: Fri, 26 Jul 2024 11:46:03 +0530
From: Pavan Chebbi <pavan.chebbi@...adcom.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com, 
	pabeni@...hat.com, michael.chan@...adcom.com, shuah@...nel.org, 
	ecree.xilinx@...il.com, przemyslaw.kitszel@...el.com, ahmed.zaki@...el.com, 
	andrew@...n.ch, willemb@...gle.com, petrm@...dia.com
Subject: Re: [PATCH net 1/5] eth: bnxt: reject unsupported hash functions

On Fri, Jul 26, 2024 at 3:54 AM Jakub Kicinski <kuba@...nel.org> wrote:
>
> In commit under Fixes I split the bnxt_set_rxfh_context() function,
> and attached the appropriate chunks to new ops. I missed that
> bnxt_set_rxfh_context() gets called after some initial checks
> in bnxt_set_rxfh(), namely that the hash function is Toeplitz.
>
> Fixes: 5c466b4d4e75 ("eth: bnxt: move from .set_rxfh to .create_rxfh_context and friends")
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
> ---
>  drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
> index d00ef0063820..0425a54eca98 100644
> --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
> +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
> @@ -1863,8 +1863,14 @@ static void bnxt_modify_rss(struct bnxt *bp, struct ethtool_rxfh_context *ctx,
>  }
>
>  static int bnxt_rxfh_context_check(struct bnxt *bp,
> +                                  const struct ethtool_rxfh_param *rxfh,
>                                    struct netlink_ext_ack *extack)
>  {
> +       if (rxfh->hfunc && rxfh->hfunc != ETH_RSS_HASH_TOP) {
> +               NL_SET_ERR_MSG_MOD(extack, "RSS hash function not supported");
> +               return -EOPNOTSUPP;
> +       }
> +
>         if (!BNXT_SUPPORTS_MULTI_RSS_CTX(bp)) {
>                 NL_SET_ERR_MSG_MOD(extack, "RSS contexts not supported");
>                 return -EOPNOTSUPP;
> @@ -1888,7 +1894,7 @@ static int bnxt_create_rxfh_context(struct net_device *dev,
>         struct bnxt_vnic_info *vnic;
>         int rc;
>
> -       rc = bnxt_rxfh_context_check(bp, extack);
> +       rc = bnxt_rxfh_context_check(bp, rxfh, extack);
>         if (rc)
>                 return rc;
>
> @@ -1953,7 +1959,7 @@ static int bnxt_modify_rxfh_context(struct net_device *dev,
>         struct bnxt_rss_ctx *rss_ctx;
>         int rc;
>
> -       rc = bnxt_rxfh_context_check(bp, extack);
> +       rc = bnxt_rxfh_context_check(bp, rxfh, extack);
>         if (rc)
>                 return rc;
>
> --
> 2.45.2
>
Reviewed-by: Pavan Chebbi <pavan.chebbi@...adcom.com>

Thank you.

Download attachment "smime.p7s" of type "application/pkcs7-signature" (4209 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ