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:	Tue, 30 Apr 2013 11:01:49 +0900
From:	Simon Horman <horms@...ge.net.au>
To:	Laurent Pinchart <laurent.pinchart@...asonboard.com>
Cc:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>,
	netdev@...r.kernel.org, nobuhiro.iwamatsu.yj@...esas.com,
	linux-sh@...r.kernel.org
Subject: Re: [PATCH v2] sh_eth: use random MAC address if no valid one
 supplied

On Mon, Apr 29, 2013 at 10:39:17PM +0200, Laurent Pinchart wrote:
> On Monday 29 April 2013 23:49:42 Sergei Shtylyov wrote:
> > On Renesas R-Car based development boards, although a MAC address is printed
> > on all the Ethernet port labels, U-Boot  doesn't write a valid MAC address 
> > to the Ether MAHR/MALR registers (there's no storage provided for the Ether
> > MAC address either), so we have to resort to using a random MAC address...
> > 
> > Signed-off-by: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
> 
> Acked-by: Laurent Pinchart <laurent.pinchart@...asonboard.com>

Acked-by: Simon Horman <horms+renesas@...ge.net.au>

FYI, I believe that the lager board, which is an R-Car based development
board (AFAIK) does not suffer from this problem.

> > ---
> > This patch is against the 'net-next.git' repository.
> > 
> > Changes since the original posting:
> > - don't break the message string into 2 lines.
> > 
> >  drivers/net/ethernet/renesas/sh_eth.c |    5 +++++
> >  1 file changed, 5 insertions(+)
> > 
> > Index: net-next/drivers/net/ethernet/renesas/sh_eth.c
> > ===================================================================
> > --- net-next.orig/drivers/net/ethernet/renesas/sh_eth.c
> > +++ net-next/drivers/net/ethernet/renesas/sh_eth.c
> > @@ -2735,6 +2735,11 @@ static int sh_eth_drv_probe(struct platf
> > 
> >  	/* read and set MAC address */
> >  	read_mac_address(ndev, pd->mac_addr);
> > +	if (!is_valid_ether_addr(ndev->dev_addr)) {
> > +		dev_warn(&pdev->dev,
> > +			 "no valid MAC address supplied, using a random one.\n");
> > +		eth_hw_addr_random(ndev);
> > +	}
> > 
> >  	/* ioremap the TSU registers */
> >  	if (mdp->cd->tsu) {
> 
> -- 
> Regards,
> 
> Laurent Pinchart
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ