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: <20231025193113.GA994152-robh@kernel.org>
Date:   Wed, 25 Oct 2023 14:31:13 -0500
From:   Rob Herring <robh@...nel.org>
To:     Aradhya Bhatia <a-bhatia1@...com>
Cc:     Frank Rowand <frowand.list@...il.com>,
        Devicetree List <devicetree@...r.kernel.org>,
        Linux Kernel List <linux-kernel@...r.kernel.org>,
        Andrew Davis <afd@...com>, Nishanth Menon <nm@...com>,
        Vignesh Raghavendra <vigneshr@...com>,
        Devarsh Thakkar <devarsht@...com>,
        Jai Luthra <j-luthra@...com>,
        Jayesh Choudhary <j-choudhary@...com>
Subject: Re: [PATCH] scripts/dtc: Allow ports to have a single port@0 child

On Fri, Oct 13, 2023 at 02:24:24PM +0530, Aradhya Bhatia wrote:
> Exempt 'ports' from the rule which asserts that nodes with single child
> node having reg = 0, should not have the '#size-cells' and
> '#address-cells' properties.
> 
> Ports of certain hardware do need to be described as only having a
> single child node 'port@0', especially when hardware has multiple ports,
> and the other ports 'port@x' are planned to be added subsequently. In
> such cases, just using 'port', would be an inaccurate hardware
> description.
> 
> For example, Texas Instruments' DSS (display-subsystem), which has 2 or
> 4 video ports depending on the SoC. Describing the first video port with
> just 'port' under ports would be inaccurate and even slightly
> misleading. Simply using port@0 (when other ports are not added)
> produces the following warning, while making dtbs with W=1 flag set[0].

There's a reason this is behind W=1.

In general, if you only have a single 'port' it should be just 'port' 
which is equivalent to port 0. There's exceptions to that, so the 
warning is off by default.

> code-block ::
> 
> 	Warning (graph_child_address): /bus@...000/dss@...0000/ports:
> 	graph node has single child node 'port@0',
> 	#address-cells/#size-cells are not necessary
> 
> Signed-off-by: Aradhya Bhatia <a-bhatia1@...com>
> 
> [0]: https://lore.kernel.org/all/570903b6-8239-d44a-5fac-71700804cb5d@ti.com/
> ---
>  scripts/dtc/checks.c | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)

This is a copy of upstream dtc. We don't take patches for it (except in 
emergency). Look at the commit history.

Rob

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ