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]
Date:   Thu, 18 Aug 2022 14:20:59 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     Sergei Antonov <saproj@...il.com>
Cc:     netdev@...r.kernel.org, Jakub Kicinski <kuba@...nel.org>,
        Vladimir Oltean <olteanv@...il.com>,
        Yang Yingliang <yangyingliang@...wei.com>,
        Pavel Skripkin <paskripkin@...il.com>,
        Guobin Huang <huangguobin4@...wei.com>,
        Yang Wei <yang.wei9@....com.cn>,
        Christophe JAILLET <christophe.jaillet@...adoo.fr>
Subject: Re: [PATCH v2] net: moxa: MAC address reading, generating, validity
 checking

On Thu, Aug 18, 2022 at 12:23:17PM +0300, Sergei Antonov wrote:
> This device does not remember its MAC address, so add a possibility
> to get it from the platform. If it fails, generate a random address.
> This will provide a MAC address early during boot without user space
> being involved.
> 
> Also remove extra calls to is_valid_ether_addr().
> 
> Made after suggestions by Andrew Lunn:
> 1) Use eth_hw_addr_random() to assign a random MAC address during probe.
> 2) Remove is_valid_ether_addr() from moxart_mac_open()
> 3) Add a call to platform_get_ethdev_address() during probe
> 4) Remove is_valid_ether_addr() from moxart_set_mac_address(). The core does this
> 
> v1 -> v2:
> Handle EPROBE_DEFER returned from platform_get_ethdev_address().
> Move MAC reading code to the beginning of the probe function.
> 
> Signed-off-by: Sergei Antonov <saproj@...il.com>
> Suggested-by: Andrew Lunn <andrew@...n.ch>

Reviewed-by: Andrew Lunn <andrew@...n.ch>

    Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ