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: <6a7a37813e71420b929c769dd1e77664@asem.it>
Date:   Thu, 28 Feb 2019 17:13:27 +0000
From:   Flavio Suligoi <f.suligoi@...m.it>
To:     Andrew Lunn <andrew@...n.ch>
CC:     Jeff Kirsher <jeffrey.t.kirsher@...el.com>,
        "David S . Miller" <davem@...emloft.net>,
        "intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v3] net: e1000e: add MAC address kernel cmd line parameter

> > Hi Andrew,
> >
> > we produce a lot of boards and we have to change the MAC address,
> > from u-boot, for every board.  So I must save in the u-boot
> > environment (SPI NOR flash) the MAC address for every board.
> 
> Hi Flavio
> 
> u-boot should be able to write the MAC address in the correct part of
> device tree. Boards have been doing this a long time.
> 
> Module parameters are considered bad. You should only do it if you
> have no other option. Here you do have another options, so it is going
> to be a hard sell getting David to access your patch.
> 
> You will have more success by adding a call to
> eth_platform_get_mac_address() to the e1000e driver.

You have right, and thanks for your suggestions, 
but with a kernel parameter I can use the same method
for any board where the NVM is missed, independently of any architecture
(with or without the device tree presence - ARM or x86 or others).

In fact slso the drivers/net/ethernet/freescale/fec_main.c provides
a kernel parameter for the MAC address, in fec_get_mac:

	/*
	 * try to get mac address in following order:
	 *
	 * 1) module parameter via kernel command line in form
	 *    fec.macaddr=0x00,0x04,0x9f,0x01,0x30,0xe0
	 */
	iap = macaddr;

Thanks,

Flavio

>    Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ