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: <5f24d66d-57d4-4424-d524-58a6d0687f02@oracle.com>
Date:   Fri, 7 Sep 2018 13:33:55 -0400
From:   Boris Ostrovsky <boris.ostrovsky@...cle.com>
To:     Sasha Levin <Alexander.Levin@...rosoft.com>,
        "stable@...r.kernel.org" <stable@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Cc:     vkuznets <vkuznets@...hat.com>,
        "David S . Miller" <davem@...emloft.net>
Subject: Re: [PATCH AUTOSEL 4.18 69/88] xen-netfront: fix queue name setting

On 09/06/2018 08:36 PM, Sasha Levin wrote:
> From: Vitaly Kuznetsov <vkuznets@...hat.com>
>
> [ Upstream commit 2d408c0d4574b01b9ed45e02516888bf925e11a9 ]
>
> Commit f599c64fdf7d ("xen-netfront: Fix race between device setup and
> open") changed the initialization order: xennet_create_queues() now
> happens before we do register_netdev() so using netdev->name in
> xennet_init_queue() is incorrect, we end up with the following in
> /proc/interrupts:
>
>  60:        139          0   xen-dyn    -event     eth%d-q0-tx
>  61:        265          0   xen-dyn    -event     eth%d-q0-rx
>  62:        234          0   xen-dyn    -event     eth%d-q1-tx
>  63:          1          0   xen-dyn    -event     eth%d-q1-rx
>
> and this looks ugly. Actually, using early netdev name (even when it's
> already set) is also not ideal: nowadays we tend to rename eth devices
> and queue name may end up not corresponding to the netdev name.
>
> Use nodename from xenbus device for queue naming: this can't change in VM's
> lifetime. Now /proc/interrupts looks like
>
>  62:        202          0   xen-dyn    -event     device/vif/0-q0-tx
>  63:        317          0   xen-dyn    -event     device/vif/0-q0-rx
>  64:        262          0   xen-dyn    -event     device/vif/0-q1-tx
>  65:         17          0   xen-dyn    -event     device/vif/0-q1-rx
>
> Fixes: f599c64fdf7d ("xen-netfront: Fix race between device setup and open")
> Signed-off-by: Vitaly Kuznetsov <vkuznets@...hat.com>
> Reviewed-by: Ross Lagerwall <ross.lagerwall@...rix.com>
> Signed-off-by: David S. Miller <davem@...emloft.net>
> Signed-off-by: Sasha Levin <alexander.levin@...rosoft.com>


You also want to pull commit 21f2706b20100bb3db378461ab9b8e2035309b5b.

-boris


> ---
>  drivers/net/xen-netfront.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
> index 9dd2ca62d84a..5a14b917eee2 100644
> --- a/drivers/net/xen-netfront.c
> +++ b/drivers/net/xen-netfront.c
> @@ -1610,7 +1610,7 @@ static int xennet_init_queue(struct netfront_queue *queue)
>  	timer_setup(&queue->rx_refill_timer, rx_refill_timeout, 0);
>  
>  	snprintf(queue->name, sizeof(queue->name), "%s-q%u",
> -		 queue->info->netdev->name, queue->id);
> +		 queue->info->xbdev->nodename, queue->id);
>  
>  	/* Initialise tx_skbs as a free chain containing every entry. */
>  	queue->tx_skb_freelist = 0;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ