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]
Message-ID: <20230612103901.06efe4d6@kernel.org>
Date: Mon, 12 Jun 2023 10:39:01 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Piotr Gardocki <piotrx.gardocki@...el.com>
Cc: Maciej Fijalkowski <maciej.fijalkowski@...el.com>,
 <netdev@...r.kernel.org>, <przemyslaw.kitszel@...el.com>,
 <michal.swiatkowski@...ux.intel.com>, <pmenzel@...gen.mpg.de>,
 <anthony.l.nguyen@...el.com>, <simon.horman@...igine.com>,
 <aleksander.lobakin@...el.com>
Subject: Re: [PATCH net-next] net: add check for current MAC address in
 dev_set_mac_address

On Mon, 12 Jun 2023 18:43:01 +0200 Piotr Gardocki wrote:
> On 12.06.2023 17:37, Maciej Fijalkowski wrote:
> > On Mon, Jun 12, 2023 at 04:49:47PM +0200, Piotr Gardocki wrote:  
> >> Before re-sending I just want to double check.
> >> Did you mean checking if sa->sa_family == AF_LOCAL ?
> >> There's no length in sockaddr.
> >>
> >> It would like this:
> >> 	if (sa->sa_family == AF_LOCAL &&
> >> 	    ether_addr_equal(dev->dev_addr, sa->sa_data))
> >> 		return 0;  
> > 
> > I believe Jakub just wanted this:
> > 
> > 	if (dev->addr_len)
> > 		if (ether_addr_equal(dev->dev_addr, sa->sa_data))
> > 			return 0;
> > 
> > so no clue why you want anything from sockaddr?  
> 
> I understood that dev->type and dev->addr_len can just be different
> than AF_LOCAL and 48 bits in this function.
> Your version does not convince me, let's wait for Jakub's judgement.

I'm probably missing something because I'm not sure where 
the discussion about AF_LOCAL came from. All I meant is:

	if (!memcmp(dev->dev_addr, sa->sa_data, dev->addr_len))
		return 0;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ