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: <20240130170625.GA1847581-robh@kernel.org>
Date: Tue, 30 Jan 2024 11:06:25 -0600
From: Rob Herring <robh@...nel.org>
To: David Heidelberg <david@...t.cz>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
	Viresh Kumar <vireshk@...nel.org>, Nishanth Menon <nm@...com>,
	Stephen Boyd <sboyd@...nel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
	Conor Dooley <conor+dt@...nel.org>,
	Manivannan Sadhasivam <mani@...nel.org>,
	Bjorn Andersson <andersson@...nel.org>,
	Viresh Kumar <viresh.kumar@...aro.org>, linux-pm@...r.kernel.org,
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] dt-bindings: opp: switch inner and outer min/maxItems
 rules for opp-hz

On Tue, Jan 02, 2024 at 04:58:15PM -0700, Rob Herring wrote:
> On Sat, Dec 30, 2023 at 03:17:21PM +0100, Krzysztof Kozlowski wrote:
> > On 29/12/2023 20:10, David Heidelberg wrote:
> > > Fixes issue as:
> > > ```
> > 
> > Drop, it's not RST, but commit msg.
> > 
> > > arch/arm64/boot/dts/qcom/sdm845-oneplus-enchilada.dtb: opp-table: opp-200000000:opp-hz:0: [200000000, 0, 0, 150000000, 0, 0, 0, 0, 300000000] is too long
> > > ```
> > > 
> > > Fixes: 3cb16ad69bef ("dt-bindings: opp: accept array of frequencies")
> > > 
> > > Signed-off-by: David Heidelberg <david@...t.cz>
> > > ---
> > >  Documentation/devicetree/bindings/opp/opp-v2-base.yaml | 5 ++---
> > >  1 file changed, 2 insertions(+), 3 deletions(-)
> > > 
> > > diff --git a/Documentation/devicetree/bindings/opp/opp-v2-base.yaml b/Documentation/devicetree/bindings/opp/opp-v2-base.yaml
> > > index e2f8f7af3cf4..86d3aa0eb435 100644
> > > --- a/Documentation/devicetree/bindings/opp/opp-v2-base.yaml
> > > +++ b/Documentation/devicetree/bindings/opp/opp-v2-base.yaml
> > > @@ -55,10 +55,9 @@ patternProperties:
> > >            to relate the values to their clocks or the order in which the clocks
> > >            need to be configured and that is left for the implementation
> > >            specific binding.
> > > -        minItems: 1
> > > -        maxItems: 32
> > >          items:
> > > -          maxItems: 1
> > > +          minItems: 1
> > > +          maxItems: 32
> > 
> > This does not look like correct fix. The original code looked fine -
> > only one item is allowed in each sub-element (array).
> 
> This one is special being 64-bit values so we have an exception in 
> property-units.yaml. The constraints here don't get used in decoding the 
> dtb and the default way of 1 outer element is used.
> 
> It doesn't look like opp-hz needs to be a matrix as it is really just an 
> array. Perhaps it should just be changed to an array type. 
> Alternatively, adding 'items: { maxItems: 1 }' to the definition in 
> property-units.yaml fixes the issue as well.
> 
> Though we can fix this, I'm looking into if we have other cases where we 
> need this to work as-is. There's probably some room for improvement in 
> how matrix dimensions are handled.

I've made some improvements on matrix dimensions, but this one is still 
an issue. Can you respin this dropping 'items: {maxItems: 1}'. I'm going 
to change the definition in property-units.yaml to uint64-array.

Rob

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ