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: <51134d12-1b06-6d6f-e798-7dd681a8f3ae@microchip.com>
Date:   Thu, 9 Feb 2023 18:51:58 +0000
From:   <Ajay.Kathat@...rochip.com>
To:     <kuba@...nel.org>
CC:     <heiko.thiery@...il.com>, <Claudiu.Beznea@...rochip.com>,
        <kvalo@...nel.org>, <linux-wireless@...r.kernel.org>,
        <michael@...le.cc>, <netdev@...r.kernel.org>,
        <Amisha.Patel@...rochip.com>
Subject: Re: wilc1000 MAC address is 00:00:00:00:00:00

On 2/9/23 10:48, Jakub Kicinski wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> On Thu, 9 Feb 2023 17:15:38 +0000 Ajay.Kathat@...rochip.com wrote:
>> IIUC network manager(NM) is trying to read the MAC address and write the
>> same back to wilc1000 module without making the wlan0 interface up. right?
>>
>> Not sure about the requirement but if NM has a valid MAC address to
>> assign to the wlan0 interface, it can be configured without making
>> interface up("wlan0 up"). "ip link set dev wlan0 address XX:XX:XX:XX:XX"
>> command should allow to set the mac address without making the interface
>> up.
>> Once the mac address is set, the wilc1000 will use that mac address [1]
>> instead of the one from wilc1000 NV memory until reboot. However, after
>> a reboot, if no MAC address is configured from application then wilc1000
>> will use the address from its NV memory.
> 
> netdev should be created with a valid lladdr, is there something
> wifi-specific here that'd prevalent that? The canonical flow is
> to this before registering the netdev:
> 

Here it's the timing in wilc1000 by when the MAC address is available to
read from NV. NV read is available in "mac_open" net_device_ops instead
of bus probe function. I think, mostly the operations on netdev which
make use of mac address are performed after the "mac_open" (I may be
missing something).

Does it make sense to assign a random address in probe and later read
back from NV in mac_open to make use of stored value?


probe()
  eth_hw_addr_random();


mac_open()
   if (is_random_address())
       read_mac_from_nv();
       eth_hw_addr_set(ndev, addr);


Regards,
Ajay

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ