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  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:   Fri, 8 May 2020 15:50:18 +0200
From:   Andrew Lunn <>
To:     Igor Russkikh <>
Cc:     Jakub Kicinski <>,,
        "David S . Miller" <>,
        Mark Starovoytov <>
Subject: Re: [EXT] Re: [PATCH net-next 7/7] net: atlantic: unify

On Fri, May 08, 2020 at 04:22:40PM +0300, Igor Russkikh wrote:
> >>> Right, but why do you have your own mac generation rather than using
> >>> eth_hw_addr_random(). You need to set NET_ADDR_RANDOM for example,
> >>> just use standard helpers, please.
> >>
> >> We want this still be an Aquantia vendor id MAC, not a fully random mac.
> >> Thats why the logic below randomizes only low three octets.
> > 
> > Hi Igor
> > 
> > How safe is that?  It reduces the available pool space by 22
> > bits. It greatly increases the likelihood of a collision.
> >>>> +	get_random_bytes(&rnd, sizeof(unsigned int));
> >>>> +	l = 0xE300 0000U | (0xFFFFU & rnd) | (0x00 << 16);
> >>>> +	h = 0x8001300EU;
> > 
> > Is this Marvell/Aquantias OUI? Are you setting the locally
> > administered bit? You probably should be, since this is local, not
> > issued with a guarantee of being unique. 
> Yes, thats Aquantia's ID: 300EE3
> Honestly, the subject of the discussion are only adapters with zeroed, not
> burned MACs. In production there could not exist such adapters. We do have
> this code mainly to cover engineering samples some of which comes unflashed.
> So overall, I feel its abit overkill to care about collisions.
> But we still like to see our engineering samples to have our OUI for ease of
> scripting and maintenance.

Hi Igor

At minimum, you need to put this as a comment.

And since it is not supposed to happen, you might want to throw a
WARN_ON(). The fact you are somewhat hiding the problem the FLASH is
empty, makes it more likely you actually ship unflashed devices to the
customers. A big scary looking kernel stack trace should swing the
risk back towards the safer side, and if manufacturing does mess up,
you are likely to get feedback from customers pretty quickly.


Powered by blists - more mailing lists