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]
Date:   Tue, 19 Oct 2021 21:17:19 +0200
From:   Sven Eckelmann <sven@...fation.org>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     netdev@...r.kernel.org, mareklindner@...mailbox.ch,
        b.a.t.m.a.n@...ts.open-mesh.org, a@...table.cc,
        sw@...onwunderlich.de
Subject: Re: [PATCH] batman-adv: use eth_hw_addr_set() instead of ether_addr_copy()

On Tuesday, 19 October 2021 21:06:54 CEST Jakub Kicinski wrote:
> On Tue, 19 Oct 2021 09:39:27 -0700 Jakub Kicinski wrote:
> > Commit 406f42fa0d3c ("net-next: When a bond have a massive amount
> > of VLANs...") introduced a rbtree for faster Ethernet address look
> > up. To maintain netdev->dev_addr in this tree we need to make all
> > the writes to it got through appropriate helpers.
> > 
> > Convert batman from ether_addr_copy() to eth_hw_addr_set():
> > 
> >   @@
> >   expression dev, np;
> >   @@
> >   - ether_addr_copy(dev->dev_addr, np)
> >   + eth_hw_addr_set(dev, np)
> > 
> > Signed-off-by: Jakub Kicinski <kuba@...nel.org>
> 
> Extending CC list.

Acked-by: Sven Eckelmann <sven@...fation.org>

> > diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c
> > index 0604b0279573..7ee09337fc40 100644
> > --- a/net/batman-adv/soft-interface.c
> > +++ b/net/batman-adv/soft-interface.c
> > @@ -134,7 +134,7 @@ static int batadv_interface_set_mac_addr(struct net_device *dev, void *p)
> >  		return -EADDRNOTAVAIL;
> >  
> >  	ether_addr_copy(old_addr, dev->dev_addr);
> > -	ether_addr_copy(dev->dev_addr, addr->sa_data);
> > +	eth_hw_addr_set(dev, addr->sa_data);
> >  
> >  	/* only modify transtable if it has been initialized before */
> >  	if (atomic_read(&bat_priv->mesh_state) != BATADV_MESH_ACTIVE)
> 
> 


Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ