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: <dleftj362xf54z.fsf%l.stelmach@samsung.com>
Date:   Fri, 02 Oct 2020 09:39:40 +0200
From:   Lukasz Stelmach <l.stelmach@...sung.com>
To:     Florian Fainelli <f.fainelli@...il.com>
Cc:     David Miller <davem@...emloft.net>, steve.glendinning@...well.net,
        UNGLinuxDriver@...rochip.com, kuba@...nel.org,
        netdev@...r.kernel.org, linux-usb@...r.kernel.org,
        b.zolnierkie@...sung.com, m.szyprowski@...sung.com
Subject: Re: [PATCH] net/smscx5xx: change to of_get_mac_address()
 eth_platform_get_mac_address()

It was <2020-10-01 czw 19:45>, when Florian Fainelli wrote:
> On 10/1/2020 7:05 PM, David Miller wrote:
>> From: Łukasz Stelmach <l.stelmach@...sung.com>
>> Date: Wed, 30 Sep 2020 16:25:25 +0200
>>
>>> Use more generic eth_platform_get_mac_address() which can get a MAC
>>> address from other than DT platform specific sources too. Check if the
>>> obtained address is valid.
>>>
>>> Signed-off-by: Łukasz Stelmach <l.stelmach@...sung.com>
>>
>> Failure to probe a MAC address should result in the selection of a
>> random one.  This way, the interface still comes up and is usable
>> even when the MAC address fails to be probed.
>
> True, however this behavior is not changed after this patch is
> applied, I would argue that this should be a separate patch.

In both drivers the second to last line of the *_init_mac_address()[1][2]
functions is

    eth_hw_addr_random(dev->net);

and I haven't changed that. My patches enable getting a MAC address via
arch/platform specific function[3] arch_get_platform_mac_address() if
of_get_mac_address() fails.

[1] https://elixir.bootlin.com/linux/v5.8/source/drivers/net/usb/smsc75xx.c#L758
[2] https://elixir.bootlin.com/linux/v5.8/source/drivers/net/usb/smsc95xx.c#L902
[3] https://elixir.bootlin.com/linux/v5.8/source/net/ethernet/eth.c#L502
-- 
Łukasz Stelmach
Samsung R&D Institute Poland
Samsung Electronics

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ