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]
Message-ID: <20190506140404.rg63wecj4qet2244@flea>
Date:   Mon, 6 May 2019 16:04:04 +0200
From:   Maxime Ripard <maxime.ripard@...tlin.com>
To:     Petr Štetiar <ynezz@...e.cz>
Cc:     netdev@...r.kernel.org, devicetree@...r.kernel.org,
        Andrew Lunn <andrew@...n.ch>,
        Florian Fainelli <f.fainelli@...il.com>,
        Heiner Kallweit <hkallweit1@...il.com>,
        Rob Herring <robh+dt@...nel.org>,
        Frank Rowand <frowand.list@...il.com>,
        Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
        Alban Bedel <albeu@...e.fr>, Felix Fietkau <nbd@....name>,
        John Crispin <john@...ozen.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 01/10] of_net: add NVMEM support to of_get_mac_address

On Fri, May 03, 2019 at 05:44:07PM +0200, Petr Štetiar wrote:
> Maxime Ripard <maxime.ripard@...tlin.com> [2019-05-03 16:36:43]:
>
> Hi,
>
> ...
>
> > > +	pp = devm_kzalloc(&pdev->dev, sizeof(*pp), GFP_KERNEL);
> > > +	if (!pp)
> > > +		return ERR_PTR(-ENOMEM);
> > > +
> > > +	pp->name = "nvmem-mac-address";
> > > +	pp->length = ETH_ALEN;
> > > +	pp->value = devm_kmemdup(&pdev->dev, mac, ETH_ALEN, GFP_KERNEL);
> > > +	if (!pp->value) {
> > > +		ret = -ENOMEM;
> > > +		goto free;
> > > +	}
> > > +
> > > +	ret = of_add_property(np, pp);
> > > +	if (ret)
> > > +		goto free;
> > > +
> > > +	return pp->value;
> >
> > I'm not sure why you need to do that allocation here, and why you need
> > to modify the DT?
>
> I was asked about that in v2[0] already, so just copy&pasting relevant part of
> my response here:
>
>  I've just carried it over from v1 ("of_net: add mtd-mac-address support to
>  of_get_mac_address()")[1] as nobody objected about this so far.
>
>  Honestly I don't know if it's necessary to have it, but so far address,
>  mac-address and local-mac-address properties provide this DT nodes, so I've
>  simply thought, that it would be good to have it for MAC address from NVMEM as
>  well in order to stay consistent.
>
>  [...]
>
> 0. https://patchwork.ozlabs.org/patch/1092248/#2164089
> 1. https://patchwork.ozlabs.org/patch/1086628/
>
> > can't you just return the mac address directly since it's what the
> > of_get_mac_address caller will expect anyway?
>
> I don't need this stuff, I can remove it, please just tell me what is
> appropriate and I'm going to do that.

Well, if no ones need it, then there's no point in adding support for
it then?

Maxime

--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ