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  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]
Date:   Sun, 8 Mar 2020 17:54:32 -0700
From:   Eric Dumazet <eric.dumazet@...il.com>
To:     subashab@...eaurora.org, Taehee Yoo <ap420073@...il.com>
Cc:     davem@...emloft.net, kuba@...nel.org, stranche@...eaurora.org,
        netdev@...r.kernel.org
Subject: Re: [PATCH net-next] net: rmnet: set NETIF_F_LLTX flag



On 3/8/20 5:28 PM, subashab@...eaurora.org wrote:
> On 2020-03-08 07:47, Taehee Yoo wrote:
>> The rmnet_vnd_setup(), which is the callback of ->ndo_start_xmit() is
>> allowed to call concurrently because it uses RCU protected data.
>> So, it doesn't need tx lock.
>>
>> Signed-off-by: Taehee Yoo <ap420073@...il.com>
>> ---
>>  drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c
>> b/drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c
>> index d7c52e398e4a..d58b51d277f1 100644
>> --- a/drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c
>> +++ b/drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c
>> @@ -212,6 +212,8 @@ void rmnet_vnd_setup(struct net_device *rmnet_dev)
>>      rmnet_dev->needs_free_netdev = true;
>>      rmnet_dev->ethtool_ops = &rmnet_ethtool_ops;
>>
>> +    rmnet_dev->features |= NETIF_F_LLTX;
>> +
>>      /* This perm addr will be used as interface identifier by IPv6 */
>>      rmnet_dev->addr_assign_type = NET_ADDR_RANDOM;
>>      eth_random_addr(rmnet_dev->perm_addr);
> 
> Hi Taehee
> 
> It seems the flag is deprecated per documentation.
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/tree/Documentation/networking/netdevices.txt#n73


This does not count for virtual drivers, like macvlan, bonding, tunnels...

If your ndo_start_xmit() calls dev_queue_xmit() after switching skb->dev to another device,
you do not need a lock.


Powered by blists - more mailing lists