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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <MN2PR21MB1375F30B3BEEF42DFDB3D39ECA560@MN2PR21MB1375.namprd21.prod.outlook.com>
Date:   Sun, 15 Dec 2019 16:38:00 +0000
From:   Haiyang Zhang <haiyangz@...rosoft.com>
To:     Jakub Kicinski <jakub.kicinski@...ronome.com>
CC:     "sashal@...nel.org" <sashal@...nel.org>,
        "linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        KY Srinivasan <kys@...rosoft.com>,
        Stephen Hemminger <sthemmin@...rosoft.com>,
        "olaf@...fle.de" <olaf@...fle.de>, vkuznets <vkuznets@...hat.com>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v2,net] hv_netvsc: Fix tx_table init in
 rndis_set_subchannel()



> -----Original Message-----
> From: Jakub Kicinski <jakub.kicinski@...ronome.com>
> Sent: Saturday, December 14, 2019 2:30 PM
> To: Haiyang Zhang <haiyangz@...rosoft.com>
> Cc: sashal@...nel.org; linux-hyperv@...r.kernel.org; netdev@...r.kernel.org;
> KY Srinivasan <kys@...rosoft.com>; Stephen Hemminger
> <sthemmin@...rosoft.com>; olaf@...fle.de; vkuznets
> <vkuznets@...hat.com>; davem@...emloft.net; linux-kernel@...r.kernel.org
> Subject: Re: [PATCH v2,net] hv_netvsc: Fix tx_table init in rndis_set_subchannel()
> 
> On Wed, 11 Dec 2019 14:26:27 -0800, Haiyang Zhang wrote:
> > Host can provide send indirection table messages anytime after RSS is
> > enabled by calling rndis_filter_set_rss_param(). So the host provided
> > table values may be overwritten by the initialization in
> > rndis_set_subchannel().
> >
> > To prevent this problem, move the tx_table initialization before calling
> > rndis_filter_set_rss_param().
> >
> > Fixes: a6fb6aa3cfa9 ("hv_netvsc: Set tx_table to equal weight after
> subchannels open")
> > Signed-off-by: Haiyang Zhang <haiyangz@...rosoft.com>
> 
> Applied, but there are two more problems with this code:
>  - you should not reset the indirection table if it was configured by
>    the user to something other than the default (use the
>    netif_is_rxfh_configured() helper to check for that)

For Send indirection table (tx_table) ethtool doesn't have the option 
to set it, and it's usually provided by the host. So we always initialize 
it...
But, yes, for Receive indirection table (rx_table), I will make a fix, so 
it will be set to default only for new devices, or changing the number 
of channels; otherwise it will remain the same during operations like 
changing MTU, ringparam.


>  - you should use the ethtool_rxfh_indir_default() wrapper
For rx_table, we already use it:
                rndis_device->rx_table[i] = ethtool_rxfh_indir_default(
For tx_table, I know it's the same operation (%, mod), but this wrapper 
function's name is for rx_table. Should we use it for tx_table too?

> 
> Please fix the former problem in the net tree, and after net is merged
> into linux/master and net-next in a week or two please follow up with
> the fix for the latter for net-next.

Sure.

Thanks,
- Haiyang

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ