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: <20170411.221241.2175639910931847215.davem@davemloft.net>
Date:   Tue, 11 Apr 2017 22:12:41 -0400 (EDT)
From:   David Miller <davem@...emloft.net>
To:     haiyangz@...rosoft.com, haiyangz@...hange.microsoft.com
Cc:     netdev@...r.kernel.org, kys@...rosoft.com, olaf@...fle.de,
        vkuznets@...hat.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next,1/3] hv_netvsc: Use per socket hash when
 available

From: Haiyang Zhang <haiyangz@...hange.microsoft.com>
Date: Sat,  8 Apr 2017 17:53:59 -0700

> diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
> index f24c289..0a129cb 100644
> --- a/drivers/net/hyperv/netvsc_drv.c
> +++ b/drivers/net/hyperv/netvsc_drv.c
> @@ -211,9 +211,14 @@ static u16 netvsc_select_queue(struct net_device *ndev, struct sk_buff *skb,
>  	int q_idx = sk_tx_queue_get(sk);
>  
>  	if (q_idx < 0 || skb->ooo_okay || q_idx >= num_tx_queues) {
> -		u16 hash = __skb_tx_hash(ndev, skb, VRSS_SEND_TAB_SIZE);
> +		u16 hash;
>  		int new_idx;
>  
> +		if (sk)
> +			skb_set_hash_from_sk(skb, sk);
> +
> +		hash = __skb_tx_hash(ndev, skb, VRSS_SEND_TAB_SIZE);

Please do not do this.

TCP performs this operation for you for every pack it emits.

And also every socket family that uses skb_set_owner_w() either
directly or indirectly gets this done as well.

I do not want to see drivers start to get peppered with calls to this
thing.

Explain the case which is missing that matters, and we can address
that instead.

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ