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]
Message-ID: <20120208145823.75f386c5@nehalam.linuxnetplumber.net>
Date:	Wed, 8 Feb 2012 14:58:23 -0800
From:	Stephen Hemminger <shemminger@...tta.com>
To:	Danny Kukawka <danny.kukawka@...ect.de>
Cc:	"David S. Miller" <davem@...emloft.net>,
	Danny Kukawka <dkukawka@...e.de>, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [RFC][PATCH 00/50] set addr_assign_type to NET_ADDR_RANDOM if 
 a random mac address get assigned to a netdevice

On Wed,  8 Feb 2012 22:10:07 +0100
Danny Kukawka <danny.kukawka@...ect.de> wrote:

> The information if a device has a random MAC address is exported
> to the userspace via /sys/class/net/*/addr_assign_type, which
> export net_device->addr_assign_type.
> 
> Currently only a few driver really use dev_hw_addr_random() to
> set addr_assign_type correctly to NET_ADDR_RANDOM.
> 
> This patch change the drivers which set random addresses to
> change also addr_assign_type to NET_ADDR_RANDOM.
> 
> To reflect if the MAC was changed from userspace via SIOCSIFHWADDR,
> which means it's no longer a random address set by the kernel,
> this patch remove NET_ADDR_RANDOM from addr_assign_type in this
> case.
> 
> With this patch tools from userspace can now detect devices with
> random MAC addresses and change them to persistent addresses if
> needed (as e.g. in case of smsc95xx on PandaBoard).
> 
> Maybe it makes sense to introduce a new state for addr_assign_type
> to reflect the fact, that the MAC address was changed via a ioctl
> from user space, e.g, with NET_ADDR_USERSPACE ?
> 


This reminds me that passing dev->dev_addr to dev_hw_addr_rrandom is redundant
for all the instances you showed, so why is it ia parameter.

Also it should BUG() if address length is not 6 (ETH_ALEN).

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ