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] [day] [month] [year] [list]
Date:   Thu, 1 Sep 2016 16:30:28 +0100
From:   Zubair Lutfullah Kakakhel <Zubair.Kakakhel@...tec.com>
To:     Sergei Shtylyov <sergei.shtylyov@...entembedded.com>,
        <monstr@...str.eu>, <ralf@...ux-mips.org>, <tglx@...utronix.de>,
        <jason@...edaemon.net>, <marc.zyngier@....com>
CC:     <soren.brinkmann@...inx.com>, <linux-kernel@...r.kernel.org>,
        <linux-mips@...ux-mips.org>, <michal.simek@...inx.com>,
        <netdev@...r.kernel.org>
Subject: Re: [Patch v3 08/11] net: ethernet: xilinx: Generate random mac if
 none found



On 09/01/2016 11:52 AM, Sergei Shtylyov wrote:
> Hello.
>
> On 8/31/2016 7:35 PM, Zubair Lutfullah Kakakhel wrote:
>
>> At the moment, if the emaclite device doesn't find a mac address
>> from any source, it simply uses 0x0 with a warning printed.
>>
>> Instead of using a 0x0 mac address, use a randomly generated one.
>>
>> Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@...tec.com>
> [...]
>
>> diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
>> index 3cee84a..22e5a5a 100644
>> --- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c
>> +++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
>> @@ -1134,8 +1134,10 @@ static int xemaclite_of_probe(struct platform_device *ofdev)
>>      if (mac_address)
>>          /* Set the MAC address. */
>>          memcpy(ndev->dev_addr, mac_address, ETH_ALEN);
>> -    else
>> -        dev_warn(dev, "No MAC address found\n");
>> +    else {
>> +        dev_warn(dev, "No MAC address found. Generating Random one\n");
>> +        eth_hw_addr_random(ndev);
>> +    }
>
>    All branches of the *if* statement should have {} if at least one has them, see Documentation/CodingStyle, chaoter 3.

Спасибо

ZubairLK

>
> [...]
>
> MBR, Sergei
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ