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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 18 May 2020 16:33:03 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Rohit Maheshwari <rohitm@...lsio.com>
Cc:     netdev@...r.kernel.org, davem@...emloft.net, secdev@...lsio.com
Subject: Re: [PATCH net] cxgb4/chcr: Enable ktls settings at run time

On Mon, 18 May 2020 14:29:18 +0530 Rohit Maheshwari wrote:
>  	for_each_port(adap, i) {
>  		netdev = adap->port[i];
> -		netdev->features |= NETIF_F_HW_TLS_TX;
>  		netdev->hw_features |= NETIF_F_HW_TLS_TX;
>  		netdev->tlsdev_ops = &chcr_ktls_ops;
> +
> +		rtnl_lock();
> +		netdev_update_features(netdev);
> +		rtnl_unlock();
>  	}
>  }
>  
> @@ -571,6 +584,10 @@ void chcr_disable_ktls(struct adapter *adap)
>  		netdev->features &= ~NETIF_F_HW_TLS_TX;
>  		netdev->hw_features &= ~NETIF_F_HW_TLS_TX;

Twiddling with device flags without holding rtnl_lock seems
questionable.

>  		netdev->tlsdev_ops = NULL;

Clearing the ops pointer at runtime with no synchronization - even more
so. What if TLS code is mid-way through adding a connection?

> +		rtnl_lock();
> +		netdev_update_features(netdev);
> +		rtnl_unlock();
>  	}
>  }

Powered by blists - more mailing lists