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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DB8PR04MB6985A0B6A4811DCD5C7B8A6AECFE0@DB8PR04MB6985.eurprd04.prod.outlook.com>
Date:   Mon, 9 Mar 2020 10:17:36 +0000
From:   "Madalin Bucur (OSS)" <madalin.bucur@....nxp.com>
To:     Sascha Hauer <s.hauer@...gutronix.de>,
        "Madalin Bucur (OSS)" <madalin.bucur@....nxp.com>
CC:     "davem@...emloft.net" <davem@...emloft.net>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: [PATCH net-next v3 2/3] fsl/fman: tolerate missing MAC address in
 device tree

> -----Original Message-----
> From: Sascha Hauer <s.hauer@...gutronix.de>
> Sent: Monday, March 9, 2020 8:47 AM
> To: Madalin Bucur (OSS) <madalin.bucur@....nxp.com>
> Cc: davem@...emloft.net; netdev@...r.kernel.org
> Subject: Re: [PATCH net-next v3 2/3] fsl/fman: tolerate missing MAC
> address in device tree
> 
> On Thu, Mar 05, 2020 at 07:08:57PM +0200, Madalin Bucur wrote:
> > Allow the initialization of the MAC to be performed even if the
> > device tree does not provide a valid MAC address. Later a random
> > MAC address should be assigned by the Ethernet driver.
> >
> > Signed-off-by: Sascha Hauer <s.hauer@...gutronix.de>
> > Signed-off-by: Madalin Bucur <madalin.bucur@....nxp.com>
> > ---
> >  drivers/net/ethernet/freescale/fman/fman_dtsec.c | 10 ++++------
> >  drivers/net/ethernet/freescale/fman/fman_memac.c | 10 ++++------
> >  drivers/net/ethernet/freescale/fman/fman_tgec.c  | 10 ++++------
> >  drivers/net/ethernet/freescale/fman/mac.c        | 13 ++++++-------
> >  4 files changed, 18 insertions(+), 25 deletions(-)
> >
<snip>
> >  	/* Get the MAC address */
> >  	mac_addr = of_get_mac_address(mac_node);
> > -	if (IS_ERR(mac_addr)) {
> > -		dev_err(dev, "of_get_mac_address(%pOF) failed\n", mac_node);
> > -		err = -EINVAL;
> > -		goto _return_of_get_parent;
> > -	}
> > -	ether_addr_copy(mac_dev->addr, mac_addr);
> > +	if (IS_ERR(mac_addr))
> > +		dev_warn(dev, "of_get_mac_address(%pOF) failed\n", mac_node);
> 
> Why this warning? There's nothing wrong with not providing the MAC in
> the device tree.
> 
> Sascha

Actually, there is, most likely it's the result of misconfiguration so one
must be made aware of it.

Madalin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ