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: <84ce6297-5aff-4d6e-8d31-da3f25dc8690@arinc9.com>
Date:   Mon, 5 Dec 2022 22:15:16 +0300
From:   Arınç ÜNAL <arinc.unal@...nc9.com>
To:     Vladimir Oltean <olteanv@...il.com>,
        Pali Rohár <pali@...nel.org>
Cc:     Rob Herring <robh@...nel.org>,
        Michael Ellerman <mpe@...erman.id.au>, netdev@...r.kernel.org,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        linuxppc-dev@...ts.ozlabs.org,
        Marek Behún <kabel@...nel.org>,
        Jonas Gorski <jonas.gorski@...il.com>
Subject: Re: [PATCH 5/5] powerpc: dts: remove label = "cpu" from DSA
 dt-binding

On 4.12.2022 21:59, Vladimir Oltean wrote:
> Hi Pali,
> 
> On Fri, Dec 02, 2022 at 08:35:52PM +0100, Pali Rohár wrote:
>> On Thursday 01 December 2022 17:44:00 Rob Herring wrote:
>>> On Thu, Dec 01, 2022 at 06:39:02PM +0100, Pali Rohár wrote:
>>>> I was told by Marek (CCed) that DSA port connected to CPU should have
>>>> label "cpu" and not "cpu<number>". Modern way for specifying CPU port is
>>>> by defining reference to network device, which there is already (&enet1
>>>> and &enet0). So that change just "fixed" incorrect naming cpu0 and cpu1.
>>>>
>>>> So probably linux kernel does not need label = "cpu" in DTS anymore. But
>>>> this is not the reason to remove this property. Linux kernel does not
>>>> use lot of other nodes and properties too... Device tree should describe
>>>> hardware and not its usage in Linux. "label" property is valid in device
>>>> tree and it exactly describes what or where is this node connected. And
>>>> it may be used for other systems.
>>>>
>>>> So I do not see a point in removing "label" properties from turris1x.dts
>>>> file, nor from any other dts file.
>>>
>>> Well, it seems like a bit of an abuse of 'label' to me. 'label' should
>>> be aligned with a sticker or other identifier identifying something to a
>>> human. Software should never care what the value of 'label' is.
>>
>> But it already does. "label" property is used for setting (initial)
>> network interface name for DSA drivers. And you can try to call e.g.
>> git grep '"cpu"' net/dsa drivers/net/dsa to see that cpu is still
>> present on some dsa places (probably relict or backward compatibility
>> before eth reference).
> 
> Can you try to eliminate the word "probably" from the information you
> transmit and be specific about when did the DSA binding parse or require
> the 'label = "cpu"' property for CPU ports in any way?

As Jonas (on CC) pointed out, I only see this being used in the swconfig 
b53 driver which uses the label to identify the cpu port.

https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/generic/files/drivers/net/phy/b53/b53_common.c;h=87d731ec3e2a868dc8389f554b1dc9ab42c30be2;hb=HEAD#l1508

Maybe this got into DSA dt-bindings unchecked before it was decided to 
move forward with DSA instead of swconfig on Linux.

Arınç

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ