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: <e5e80965-4d81-5d32-8df7-7708e98fc2e6@solarflare.com>
Date:   Fri, 28 Sep 2018 08:30:05 +0100
From:   Bert Kenward <bkenward@...arflare.com>
To:     Eric Dumazet <edumazet@...gle.com>,
        "David S . Miller" <davem@...emloft.net>
CC:     netdev <netdev@...r.kernel.org>,
        Michael Chan <michael.chan@...adcom.com>,
        Aviad Krawczyk <aviad.krawczyk@...wei.com>,
        Song Liu <songliubraving@...com>,
        Douglas Miller <dougmill@...ux.vnet.ibm.com>,
        Yisen Zhuang <yisen.zhuang@...wei.com>,
        "Michael S . Tsirkin" <mst@...hat.com>,
        Jason Wang <jasowang@...hat.com>,
        Harish Patil <harish.patil@...ium.com>,
        Manish Chopra <manish.chopra@...ium.com>,
        Netanel Belgazal <netanel@...zon.com>,
        "Solarflare linux maintainers" <linux-net-drivers@...arflare.com>,
        Thomas Falcon <tlfalcon@...ux.vnet.ibm.com>,
        Edward Cree <ecree@...arflare.com>
Subject: Re: [PATCH net 09/11] sfc: remove ndo_poll_controller

On 27/09/18 17:31, Eric Dumazet wrote:
> As diagnosed by Song Liu, ndo_poll_controller() can
> be very dangerous on loaded hosts, since the cpu
> calling ndo_poll_controller() might steal all NAPI
> contexts (for all RX/TX queues of the NIC). This capture
> can last for unlimited amount of time, since one
> cpu is generally not able to drain all the queues under load.
> 
> sfc uses NAPI for TX completions, so we better let core
> networking stack call the napi->poll() to avoid the capture.
> 
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> Cc: Edward Cree <ecree@...arflare.com>
> Cc: Bert Kenward <bkenward@...arflare.com>
> Cc: Solarflare linux maintainers <linux-net-drivers@...arflare.com>

Acked-By: Bert Kenward <bkenward@...arflare.com>

> ---
>  drivers/net/ethernet/sfc/efx.c | 26 --------------------------
>  1 file changed, 26 deletions(-)
> 
> diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c
> index 330233286e785254f5f29c87f9557a305974f606..3d0dd39c289e05b8a7a6778363461ef5698dc62b 100644
> --- a/drivers/net/ethernet/sfc/efx.c
> +++ b/drivers/net/ethernet/sfc/efx.c
> @@ -2206,29 +2206,6 @@ static void efx_fini_napi(struct efx_nic *efx)
>  		efx_fini_napi_channel(channel);
>  }
>  
> -/**************************************************************************
> - *
> - * Kernel netpoll interface
> - *
> - *************************************************************************/
> -
> -#ifdef CONFIG_NET_POLL_CONTROLLER
> -
> -/* Although in the common case interrupts will be disabled, this is not
> - * guaranteed. However, all our work happens inside the NAPI callback,
> - * so no locking is required.
> - */
> -static void efx_netpoll(struct net_device *net_dev)
> -{
> -	struct efx_nic *efx = netdev_priv(net_dev);
> -	struct efx_channel *channel;
> -
> -	efx_for_each_channel(channel, efx)
> -		efx_schedule_channel(channel);
> -}
> -
> -#endif
> -
>  /**************************************************************************
>   *
>   * Kernel net device interface
> @@ -2509,9 +2486,6 @@ static const struct net_device_ops efx_netdev_ops = {
>  #endif
>  	.ndo_get_phys_port_id   = efx_get_phys_port_id,
>  	.ndo_get_phys_port_name	= efx_get_phys_port_name,
> -#ifdef CONFIG_NET_POLL_CONTROLLER
> -	.ndo_poll_controller = efx_netpoll,
> -#endif
>  	.ndo_setup_tc		= efx_setup_tc,
>  #ifdef CONFIG_RFS_ACCEL
>  	.ndo_rx_flow_steer	= efx_filter_rfs,
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ