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] [day] [month] [year] [list]
Date:   Mon, 11 Oct 2021 06:05:58 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Joe Perches <joe@...ches.com>
Cc:     davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCH net-next 3/5] ethernet: tulip: remove direct
 netdev->dev_addr writes

On Fri, 08 Oct 2021 19:35:11 -0700 Joe Perches wrote:
> > @@ -1821,8 +1823,7 @@ static void de21041_get_srom_info(struct de_private *de)
> >  #endif
> > 
> >  	/* store MAC address */
> > -	for (i = 0; i < 6; i ++)
> > -		de->dev->dev_addr[i] = ee_data[i + sa_offset];
> > +	eth_hw_addr_set(de->dev, &ee_data[i + sa_offset]);  
> 
> what is the content of i here?
> 
> Perhaps you want
> 
> 	eth_hw_addr_set(de->dev, &ee_data[sa_offset]);
> 
> 
> > diff --git a/drivers/net/ethernet/dec/tulip/dmfe.c b/drivers/net/ethernet/dec/tulip/dmfe.c  
> []
> > @@ -476,8 +476,7 @@ static int dmfe_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
> >  	}
> >  
> > 
> >  	/* Set Node address */
> > -	for (i = 0; i < 6; i++)
> > -		dev->dev_addr[i] = db->srom[20 + i];
> > +	eth_hw_addr_set(dev, &db->srom[20 + i]);  
> 
> here too

Good catch, thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ