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: <Ykm5IG2EUUSSotUF@robh.at.kernel.org>
Date:   Sun, 3 Apr 2022 10:11:28 -0500
From:   Rob Herring <robh@...nel.org>
To:     Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Cc:     Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>,
        Krzysztof Kozlowski <krzk+dt@...nel.org>,
        Alim Akhtar <alim.akhtar@...sung.com>,
        linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org,
        linux-samsung-soc@...r.kernel.org,
        Geert Uytterhoeven <geert@...ux-m68k.org>
Subject: Re: [PATCH 1/2] regulator: dt-bindings: maxim,max8997: correct array
 of voltages

On Thu, Mar 31, 2022 at 11:16:52PM +0200, Krzysztof Kozlowski wrote:
> uint32-array with voltages should be within one bracket pair <>, not
> each number in its own <>.  Also the number of elements in the array
> should be defined within "items:".

Which encoding an array uses has been a source of pain.

> 
> This fixes DT schema warnings like:
> 
>   maxim,max8997.example.dtb: pmic@66: max8997,pmic-buck1-dvs-voltage:
>     [[1350000, 1300000, 1250000, 1200000, 1150000, 1100000, 1000000, 950000]] is too short

These exist due to the move from validating yaml files to DTBs and I 
haven't come up with how to fix the warning. The schema was correct as 
it was. The change leaks the encoding (everything is a matrix) into the 
schema which we don't want to do.

The issue is in the if/then schema, the tools don't know if the type is 
an array or matrix. It gets it wrong (or different from the top-level) 
and thus the warning. I think the fix will be using the extracted type 
information to do the right transformation. The code for all this is 
pretty horrible and I've lost count of how many times I've re-written 
it. I think a lot of it can be removed when/if support for yaml encoded 
DT is removed which I think can happen in a kernel cycle or 2.

Perhaps in the short term the example can just be removed or commented 
out though that doesn't help on dts files.

Rob

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ